At tea, the Proteas were 236 for four in their second innings -- a lead of 366 runs -- after Amla had fallen for 87.
Returning captain Faf du Plessis was 42 not out and Temba Bavuma unbeaten on 12.
South Africa's current total was already well above the highest ever score made to win in the fourth innings in 118 years of Test cricket at Trent Bridge -- England's 284 for six against New Zealand in 2004.
England bowled tightly but with South Africa having established a commanding position in the match, and so much time left in the game, there was no need for their fourth- wicket pair to take undue risks.
Amla and du Plessis, both renowned for their patience at the crease, were instead content to pick off the loose ball, with the captain cutting fast bowler Mark Wood and off-driving Stuart Broad for four apiece.
Meanwhile Amla's trademark wristy flick off James Anderson gave him a boundary and he raised South Africa's 200 with a delicate swept four against off-spinner Moeen Ali.
But closing in on what would have been his 27th Test century and seventh against England, Amla -- who made 78 in the first innings -- fell 13 short this time around.
Trying to whip left-arm spinner Liam Dawson, whom he'd earlier hit for a straight six to complete his fifty, Amla was struck on the pad as he went down the pitch.
Umpire Paul Reiffel, the former Australia seamer rejected the lbw appeal but England reviewed his decision and, with replays showing the ball straightening into middle stump, Amla -- who made South Africa's Test record 311 not out against England at The Oval in 2012 -- was out.
It was the end of a near five-hour innings of 180 balls including 14 fours and that lone six.
South Africa, well beaten by 211 runs in the first of a four-match series at Lord's last week -- a match du Plessis missed following the birth of his first child -- resumed today on 75 for one.
They were already 205 runs ahead with three days left in the game.
Elgar was 38 not out and Amla 23 not out.
James Anderson, who took five for 72 in South Africa's first innings 335 -- the seventh Test five-for recorded by England's all-time leading wicket-taker at Trent Bridge -- beat Elgar's outside edge.
Stuart Broad, on his Nottinghamshire home ground, then produced an excellent delivery to Amla, on 25, which carried to wicket-keeper Jonny Bairstow.
England appealed half-heartedly and then decided against reviewing Australian umpire Simon Fry's not out decision, only for replays to indicate there had been an edge.
England needed every possible chance to stick in their dire position.
Elgar, however, had a reprieve on 55 when a thick edge off Broad flew high to gully where Anderson, diving to his left, so nearly held a spectacular catch.
The ensuing confusion saw Ben Stokes miss with a shy at the stumps.
England eventually enjoyed a wicket when the painstaking Elgar took his eye off a well-directed Stokes bouncer and tamely mis-hooked to Anderson at backward square leg.
It was a disappointing way to go but Elgar could content himself with the knowledge that his stand of 135 with Amla had all but put the match beyond England.
(This story has not been edited by Business Standard staff and is auto-generated from a syndicated feed.)