DUBAI, United Arab Emirates (AP) -- Top-ranked South Africa was eyeing a big first innings lead after legspinner Imran Tahir's five-wicket haul helped the Proteas bowl out Pakistan for 99 on the first day of the second and final test on Wednesday.
Captain Graeme Smith led from the front and was unbeaten on 67 off 138 balls with four boundaries as South Africa finished day one at 128-3. Nightwatchman Dale Steyn was with him on 3.
Tahir's 5-32 were backed up by fast bowler Steyn's 3-38, as they spearheaded knocking over Pakistan in just 2 hours, 40 minutes.
Tahir didn't figure in the Proteas' seven-wicket loss at Abu Dhabi last week, but struck three times in the space of 11 deliveries before lunch, and added two more as most of the batsmen attempted expansive shots.
Tahir, drafted after 11 months out, looked pumped up while playing a test for the first time against his country of birth.
He replaced left-armer Robin Peterson, who couldn't make an impact in the first test last week.
Steyn passed a fitness test on his right hamstring and was quick to make an impact after Pakistan captain Misbah-ul-Haq won the toss and elected to bat first.
Steyn showed why he is rated the No. 1 test bowler by setting the tone when he had Khurram Manzoor caught off the second ball. The ball swung away from Manzoor whose expansive drive flew to Faf du Plessis at gully.
South Africa's seamers seemed to have learnt from the seven-wicket drubbing in Abu Dhabi where they bowled too short of a length. Instead Steyn, Vernon Philander and Morne Morkel all bowled at fuller lengths and pinned down Pakistan to just 27 runs in the first hour.
Shan Masood (21) and Azhar Ali (19) shared a 38-run stand but both looked edgy against the seamers before South Africa struck in quick succession in the last half an hour before lunch. Pakistan dipped to 60-6 at the break.
Left-hander Masood, who made an impressive 75 in his debut test at Abu Dhabi, played on Tahir while attempting to drive off the front foot; captain Misbah couldn't read Tahir's googly as he tried to play across the line and was adjudged lbw on 2, while Adnan Akmal played on the legspinner before he'd scored with Pakistan losing three wickets at the same total of 60.
Tahir grabbed two more wickets soon after the break to surpass his previous best of 3-55 against Australia at Johannesburg in 2011.
No. 9 Babar top-scored with 25 not out and featured in a 33-run last-wicket stand with Junaid Khan, who made 4.
So much was Pakistan's frustration after being shot out under 100 for the second time this year that it wasted both television reviews inside the first five overs -- both against lanky Mohammad Irfan.
Alviro Petersen added salt in the wounds and struck the 2.16-meter (7-foot-1) paceman for three successive fours before he was trapped leg before wicket in Babar's first over.
Dean Elgar, who replaced Hashim Amla, added 54 with Smith but offered a tame catch at short leg off Ajmal. However, soon after, Smith wiped off Pakistan's sorry score with a straight boundary off the offspinner that also raised his half century off 103 balls.
Jacques Kallis' run of poor form continued as he made 7 before Ajmal had him lbw. Kallis scored only 5 and 0 in the first test.
South Africa brought in Elgar after Hashim Amla flew back home to be with his pregnant wife after the first-test defeat last week.
The Proteas are aiming to preserve their seven-year unbeaten record of not losing a test series away from home since Sri Lanka beat them 2-0 in 2006.