Just when you're about to change that stupid lock and ask them for that key, England turn up at your door with a bottle of wine and bunch of roses.

That's how it felt by the close of day three in Centurion. For as awful as England had been at the start of the day - and truly, the morning session was probably their worst in the field for a long time - by stumps they had reminded you of the good times. And as virulent as the bug sweeping through their squad may be, it isn't as contagious as hope.

Let's be clear: England still require something close to a miracle to win this match. They not only need to exceed the record fourth-innings chase at this ground by more than a hundred, they need to set a new England record in this format of the game. But Rory Burns, who would have been dismissed for a pair in this game had it not been for the introduction of the DRS, underlined his growing stature as a Test batsman to take them to stumps with hopes intact. The performance in Leeds, just four months ago, showed what was possible.

Certainly that was the view of Graham Thorpe. Thorpe, one of England's assistant coaches, admitted after play that England had made life "very hard for ourselves". And while he conceded that victory remained "a long shot", he felt England had given themselves "a fighting chance" with their batting on their third evening.

"There's a lot of runs to get but there is belief in our dressing room and maybe that's because of what the players achieved in the summer," he said. "We'll keep fighting all the way and if we have a good first session they'll become nervous and then who knows?

"We've been inconsistent with bat and ball. We've made it very hard for ourselves with the way we batted in the first innings. It's a long shot and we'll have to play well, but we've given ourselves a fighting chance."

It appeared that that chance had disappeared at lunch. While Ben Stokes had suggested before play that England's hope was to finish off the South African innings within the first hour of the day, instead they added 125 in the session with England becoming an increasingly frustrated and ragged outfit.

There are few agonies in cricket to compare with the inability to dislodge a nightwatchman. And as Anrich Nortje, a No. 11 with a first-class average of 15, helped Rassie van der Dussen add 91 for the fifth wicket, England's frustration became clear to see. For a while they descended into something approaching chaos.

It seemed reasonable to open the bowling with Sam Curran and James Anderson. The ball was only 20 overs old, after all. But when it refused to swing, England quickly reverted to a short-ball attack that failed to make use of the uneven bounce exploited by the South African bowlers the previous day.

And when that didn't work - and to be fair to England, there were moments when it was hard to understand how Nortje survived - they were guilty of over-pitching in a bid to force the breakthrough. It was an odd performance from a team containing bowlers as experienced as Stuart Broad and James Anderson and, not for the first time, the thought occurred that a quality spinner would have been a major help.

Jofra Archer's five-wicket haul - the fourth most expensive (in terms of economy rates, not overall runs) in Test history - probably provided reflection of exactly where he is in his career: a hugely talented, very raw young man who is learning his craft in the public eye.

Credit, too, must go to the batsmen. Nortje, with his fierce pace and brave batting, looks a terrific character. You imagine the English counties are eyeing him as a Kolpak recruit as a lion looks at a zebra. It looked here as if he were having far too much fun to take such an offer at this stage.

In truth, England had probably wasted the new ball on the second evening with too much short-pitched bowling. And then, having fallen behind the game, they were guilty of chasing it on the third morning. So while it was a relief when Stokes came on and took two quick wickets with traditional length balls that may have left the batsmen, it was also galling: such a tactic should surely have been tried some time earlier.

ALSO READ: South Africa ponder selection issues after attempted Archer take-down

There are extenuating circumstances for England. For a start, the pitch seemed to offer less assistance for bowlers of both sides on day three. One theory was that the cooler weather had prevented the cracks from widening on the pitch, another was that the bowlers of both sides, given little time to recover by the frenetic pace of play, are simply a bit weary. And it's a theory which would apply to England, in particular. Coming into this game suffering from illness and a lack of preparation, their batsmen gave them just 53.2 overs between innings.

To their credit, England are trying not to use the illness sweeping through their squad - Pretoriarrhoea, as it should perhaps be known - as an excuse. But as Jos Buttler and Joe Root became the latest members of the side to feel the effects, it became clear that it has played havoc with their performance and preparations.

Root forced himself to stay on the field as much as he could on day three - which was not all the time by any means - but the England management later confirmed that he would not have been able to bat on the third evening as required. Stokes was padded up to come in at No. 4. The extra night's rest earned for them by the fortitude of Burns and co. may yet prove to be crucial. We probably have to take into account Root's predicament when evaluating his captaincy on day three, at least.

Thorpe probably has a point about South Africa's potential for nerves, too. They have lost their last five Tests, after all, including the Kusal Perera-inspired miracle of Durban. England probably do present another potential choking hazard. This would be quite a heist if they can pull it off.

"We know we haven't been at our best," Thorpe admitted. "And we're not going to hide away from our first-innings batting. We know first-innings runs are important and we wanted to get a lead.

"So we're going to have to do it the hard way now. It's still a long shot, but we do have a chance to do something really special. We'll keep fighting."

George Dobell is a senior correspondent at ESPNcricinfo