South Africa captain Graeme Smith notched his fifth test double century and AB de Villiers made a chancy century as the Proteas amassed a lead of 361 in the second test against Pakistan on Thursday.

Smith was batting on 227 after an energy-sapping innings of 10 hours and De Villiers made Pakistan repent for dropping him off the first ball by scoring an attacking unbeaten 157 with South Africa finishing the day two at a solid 460-4.

Their 326-run partnership was the best fifth wicket stand for South Africa in tests as Pakistan bowlers toiled hard under hot and humid conditions for the solo success of nightwatchman Dale Steyn.

Smith faced 367 balls and hit 16 fours while De Villiers faced 262 balls, smashed 16 fours and a straight six off Saeed Ajmal (2-132) to give the Proteas a real hope of leveling the series after losing the first test by seven wickets last week.

Smith and De Villiers bettered South Africa’s previous fifth wicket stand of 267 runs made by Jacques Kallis and Ashwell Prince against West Indies at St. John’s in 2005.

“Ideally we would like to bat once in this game, that will be goal No. 1,” Smith said. “We will definitely bat the morning session tomorrow.”

Smith plundered records in a superb display of chanceless batting. He drove leftarm spinner Zulfiqar Babar to midwicket and ran two runs to complete his first double century against Pakistan off 326 balls and also became the second South African after Kallis (13,140) to score more than 9,000 test runs.

Both Smith and De Villiers made batting look very easy on a dry wicket where Pakistan was bowled out for just 99 inside three hours on the first day.

“The goal for today was to get ourselves into a position from where we could win the game,” Smith said. “The way AB played and transferred pressure, it made my life a lot easier, it was terrific knock from him.”

Pakistan’s plan to break the partnership by giving the second new ball to the spinners from one end after lunch went horribly wrong and both batsmen went on a run rampage by adding 139 runs in 26 overs in the second session before adding further 123 in 33 overs after tea.

Smith raised his 150 by hitting Ajmal for three successive boundaries while De Villiers completed his 17th test hundred in the last over before tea when he drove the offspinner to the cover fence.

Pakistan’s lone wicket came early in the day when Steyn added six more to the team’s overnight 128-3 before he offered no shot off lanky pacer Mohammad Irfan’s delivery that knocked his exposed off stump.

And with the lead only 35 at that stage, Irfan should have had the wicket of De Villiers next ball, but wicketkeeper Adnan Akmal couldn’t hold on to a low diving catch off the thick outside edge.

De Villiers could have been out leg before wicket on 25 had Pakistan not wasted both their television referrals inside the first five overs of South Africa innings on Wednesday.

Umpire Rod Tucker turned down Ajmal’s appeal but television replays showed the ball would have hit the middle and leg stump.

Pakistan also missed another chance to dismiss De Villiers on 37 when in Babar’s first over with the new ball Khurram Manzoor could not judge a top edged sweep while running backwards from midwicket.

Smith, 67 overnight, used his feet well against both spinners and seamers and raised his first century in 2013 with a straight driven boundary off Ajmal as South Africa progressed to 198-4 by lunch.

But once captain Misbah-ul-Haq took the second new ball and employed spinners, both Smith and De Villiers plundered Pakistan bowlers.

More In: Cricket | Sport