South Africa, 1-0 up in the three-match series, only have to avoid defeat to replace England as the world's top-ranked Test side.

London: Hashim Amla's unbeaten fifty steadied South Africa as England pressed with both bat and ball on the third day of the third Test at Lord's on Saturday. At stumps, the Proteas were 145 for three in their second innings -- a lead of 139 - with Amla 57 not out and nightwatchman Dale Steyn nought not out.

South Africa, 1-0 up in the three-match series, only have to avoid defeat to replace England as the world's top-ranked Test side.

Both teams had slumped to 54 for four in their first innings and South Africa were wobbling at 50 for two second time around before Amla, dropped on two, and Jacques Kallis (31) shared a third-wicket partnership of 81.

South Africa lost their first wicket when captain Graeme Smith, who'd made hundreds in his two previous Lord's Tests, missed a sweep against off-spinner Graeme Swann and was lbw for 23.

Amla was fortunate when he glanced Stuart Broad down the legside and diving wicket-keeper Matt Prior just failed to cling on to the left-handed chance. But two balls later, Broad had opener Alviro Petersen, playing across the line of a full delivery, lbw for 24.

Both Amla and Kallis initially struggled against the short ball before Kallis lofted Broad over gully for four.

Amla too found his touch, cutting Swann, who bowled 20 overs unchanged for a return of one for 38, and easing James Anderson off the backfoot. But a few overs before stumps, Kallis was lbw to fast bowler Steven Finn, with Australian umpire Simon Taufel's decision upheld on review -- much to the batsman's obvious disappointment.

Amla, however, drove Broad down the ground to complete a 95-ball fifty with his seventh four and, two balls later, elegantly stroked him through extra-cover.

Earlier, Jonathan Bairstow fell just short of a maiden Test hundred as England made 315 in reply to South Africa's first innings 309. But the recalled Bairstow had the consolation of posting a Test-best 95 after coming in when England had collapsed to 54 for four.

There was extra pressure on the 22-year-old as he'd replaced Kevin Pietersen, dropped despite scoring 149 in the drawn second Test at Headingley.

England axed South Africa-born Pietersen for sending "provocative" texts, believed to include criticisms of captain Andrew Strauss, to Proteas players. Bairstow only made his Test debut in May, at Lord's, but was dropped after his first three matches at this level, all against the West Indies, yielded a mere 38 runs in total.

But the Yorkshireman resumed Saturday on 72 not out, with England then 208 for five.

Vernon Philander struck with the first delivery with the new ball as Prior, on 27, loosely drove at an outswinger and edged to second slip Kallis. Bairstow, the son of late England wicket-keeper David Bairstow, guided fast bowler Steyn square through the offside for four and clipped Philander through midwicket to go to 90.

But he spent 15 runless balls, all against Morne Morkel, on 95, as the fast bowler tied him down on a sunny day when the blue skies above Lord's offered little assistance to the bowlers.

And tall paceman Morkel was rewarded when he bowled Bairstow, aiming across the line, to end an innings of more than five hours duration featuring 13 fours, with the batsman walking off to a standing ovation from a capacity crowd.

Morkel led the attack with four wickets for 80 runs in 28.3 overs, with Steyn taking four for 94 in 29.