Opener Khurram Manzoor notched a maiden hundred to help Pakistan take the upper hand in the first Test against South Africa in Abu Dhabi on Tuesday.
The 27-year-old right-handed batsman was unbeaten on 131 and skipper Misbah-ul Haq on 44 not out as Pakistan made a strong reply of 263-3 to South Africa's 249 at Sheikh Zayed Stadium.
Manzoor put in a solid 135 for the opening wicket with debutant Shan Masood (75) to help Pakistan take a 14-run lead with seven wickets intact.
Manzoor, who hit twin half-centuries in Pakistan's last Test against Zimbabwe in Harare in September, dominated the ball during his 244-ball knock and has so far hit 14 boundaries.
Along with Misbah he added 85 for the unbroken fourth wicket stand as Pakistan looked set to get a big lead.
In the morning South Africa were dismissed after adding just four runs to their overnight score of 245-8.
Manzoor in company of Masood started confidently, blunting a four-pronged South African pace attack on a lifeless pitch, reaching 77-0 at lunch.
Left-hander Masood was the first to reach his maiden half-century, off 102 balls while Manzoor reached his sixth fifty -- third in a row in Tests -- off 96 deliveries.
Masood finally fell, leg-before to part-timer Jean-Paul Duminy after hitting eight boundaries off 140 balls.
South Africa then hit back with two quick wickets. Paceman Vernon Philander had Azhar Ali caught behind for 11 and then Morne Morkel had Younis Khan caught in the slips for one to leave Pakistan at 178-3.
Manzoor though continued in the same vein, sweeping left-arm spinner Robin Peterson for two boundaries and an over later pushed the same bowler for two to reach three figures, getting a standing ovation from the 7,000 strong crowd.
He took 198 balls to reach the milestone, bettering his previous best of 93 made at Colombo against Sri Lanka in 2009.
Manzoor and Masood dominated the bowling in the first session, putting on a solid hundred-plus stand.
It was Pakistan's first century stand for the first wicket since Taufiq Umar and Mohammad Hafeez put on 114 against England in Dubai in January last year, ten Tests earlier.
The Manzoor-Masood pair is Pakistan's sixth different combination in seven Tests as they struggled to find a solid pair for several years.
Misbah too has batted solidly, hitting four boundaries.
Masood said he was pleased with his performance.
"We were told to keep things simple," said Masood, who celebrated his 24th birthday on Monday. "I could have batted longer, made a mistake to get out but had a decent outing.
"I think it's still even, but if we bat the whole day tomorrow we can put pressure on them," said Masood.
South African coach Russell Domingo hoped for a fightback.
"At the moment Pakistan looks strong but the second new ball will be crucial in the morning and we must find ways to come back in the game," said Domingo.
Earlier, Mohammad Irfan (3-44) dismissed centurion Hashim Amla off the second ball of the day after South Africa had resumed at 245-8.
Amla, who made 118, edged one sharp Irfan delivery straight into the hands of slip where Younis Khan held a regulation catch. He hit 13 boundaries off 252 balls and held the South African innings together on Monday.
With the catch Younis equalled Javed Miandad's all-time Test catches record for Pakistan with 93. Miandad reached the tally in 124 Tests but Younis was quicker in 85 matches.
The second and final Test starts in Dubai from October 23 before the teams play five one-day and two Twenty20 internationals.