South Africa fast bowler Marco Jansen said that his team face a difficult challenge as they chase a target of 148 with seven wickets in hand in the first Test against Pakistan.

Looking for a win to seal their place in next year's World Test Championship final, the home side were struggling at 27-3 at stumps on the third day of the Test.

Jansen registered figures of 6-52 as South Africa bundled out Pakistan for 237 in the second innings, but Mohammad Abbas (2-3) and Khurram Shahzad (1-22) picked up three wickets between them to set up an exciting fourth day.

"If Pakistan keep on bowling the lengths they did, we will have a task on our hands," said Jansen at the close of play.

"We know the new ball moves quite sharply, especially in the second innings. Once the ball gets older, it gets a lot easier to bat."

But Jansen added that the target of 148 "isn't too much" for the South Africa batters.

Pakistan had resumed the third day at 88-3 and Babar Azam and Saud Shakeel built a 79-run fourth-wicket partnership.

Azam was dismissed by Jansen after bringing up his first Test half-century in two years and in 19 Test innings before the South African pacer picked up two more quick wickets to leave the tourists reeling at 176-6.

Jansen also accounted for Shakeel (84) as he picked up his sixth wicket of the innings with Kagiso Rabada (2-68) and Corbin Bosch (1-54) wrapping up the tail-enders.

Jansen's figures are his second-best in any Test innings, after his 7-13 against Sri Lanka in Durban last month.

South Africa will begin the fourth day with opener Aiden Markram on 22 and captain Temba Bavuma yet to open his account, as they look to reach their first-ever World Test Championship final.