Quinton de Kock equalled his Test-best score of 129 before South Africa were bowled out for 303. @ Twitter/ICC

Johannesburg: A century by Quinton de Kock ensured Pakistan would face a huge task in their quest for a consolation win in the third and final Test against South Africa at the Wanderers Stadium on Sunday. Needing 381 runs to win, Pakistan were 34 for no wicket at tea on the third day. (3rd Test, South Africa vs Pakistan: FULL SCORECARD)

De Kock equalled his Test-best score of 129 before South Africa were bowled out for 303. It was De Kock’s fourth Test century and his first in two years.

De Kock went to the wicket with his side in some trouble at 93 for five, at which stage their lead was a modest 170. He shared a sixth-wicket stand of 102 with Hashim Amla, who made 71, before adding 79 for the eighth wicket with Kagiso Rabada (21).

In an innings studded with flowing strokes, De Kock reached his fifty off 49 balls and his century off 121 deliveries. He was finally caught in the deep, trying for a second successive six off leg-spinner Shadab Khan, after facing 138 balls and hitting 18 fours and a six.

Shadab finished with three for 41 while medium-pacer Faheem Ashraf took three for 42.

Pakistan opening batsmen Imam-ul-Haq and Shan Masood both started confidently as they scored freely against Dale Steyn and Vernon Philander, neither of whom was able to find the swing or seam movement that they generated in the first innings.

Pakistan have only made one total over 200 in their first five innings in the series and have not batted for longer than 70.4 overs.

Brief scores: Pakistan 185 & 34/0 need 347 runs to win versus South Africa 262 & 303 (Quinton de Kock 129, Hashim Amla 71; Faheem Ashraf 3/42, Shadab Khan 3/41)