The Pakistan-born bowler made an instant impact on his return to the South Africa line-up and his team mates made sure his hard work did not go to waste as they finished the day on 128 for three wickets, a 29-run first innings lead.
Captain Graeme Smith (67 not out) and night-watchman Dale Steyn (three not out) will resume day two on a dry, dusty track that is offering the spinners plenty of encouragement.
Tahir, playing for the first time since conceding 260 runs without a wicket against Australia in Adelaide last November, made the most of the conditions as he recorded career-best figures of 5-32 after replacing Robin Peterson as South Africa's main spin option.
He was ably supported by paceman Steyn, who took 3-38, as South Africa brutally exposed the fragility of Pakistan's top order, who were hoping to make the most of the conditions after winning the toss and electing to bat first.
Four of Tahir's victims were bowled as he made expert use of the googly turning back into the right-handed batsmen, as well as his 'slider' quicker ball that does not turn but beats the batsmen for pace.
He bowled Shan Masood for 21, before trapping Pakistan skipper Misbah-ul-Haq (two) leg before wicket. Adnan Akmal (0), Asad Shafiq (10) and Mohammad Irfan (0) were all bowled.
Steyn collected the first wicket with just the second ball of the morning as centurion from the first Test Khurram Manzoor guided the ball to gully without scoring.
He also claimed the big wicket of Younus Khan (10), and bowled number 11 Junaid Khan to wrap up the innings. Morne Morkel was the other South African bowler to prosper as he trapped Azhar Ali in front for 19.
South Africa lost Alviro Petersen (26) early in their reply, before Saeed Ajmal claimed scalps of Dean Elgar (23) and Jacques Kallis (seven) as Pakistan tried to contain the world's top Test team to a manageable first innings score.
South Africa trail 1-0 in the two-match series, having not lost an away series since 2006.
Image: Imran Tahir
Photograph: Scott Barbour/Getty Images
South Africa could miss Steyn, Amla for 2nd Test vs Pak
Xi praises PM, calls him an old friend of the Chinese people
Amla, Steyn return to South Africa T20 squad
Manzoor's maiden Test century puts Pakistan in control
Pujara slips to 8th in ICC Test rankings, Amla still top