South Africa were crowned world champions on Saturday, but their coach said he was ready to walk away as recently as last September.
After leading South Africa to Rugby World Cup glory, Rassie Erasmus claimed he was ready to resign as the Springboks' coach had they not beaten New Zealand in Wellington last year.
South Africa recorded an emphatic 32-12 victory over England to secure a record-equalling third world title in Yokohama.
In a post-match news conference, Erasmus was asked about the importance of his side's 36-34 Rugby Championship win over New Zealand in September 2018, which was widely seen as a crucial, morale-boosting triumph.
"Prior to that one we lost to Australia and Argentina, and I clearly can remember I said 'listen, if we don't win that one I'm definitely willing to resign because I've never in my coaching career lost three games in a row at any level'," revealed Erasmus.
"I thought if I lose three games in a row, I don't deserve to be the Springbok coach. We had a great chat and I said if I am preaching that we must be consistent and give people hope by the way we're playing ... but we're losing to Argentina and Australia and now we lose three in a row, then I'm out of here.
"We had that honest chat and then the boys went and beat New Zealand in Wellington. So it was pretty important, otherwise I wouldn't be sitting here."
Erasmus, who will stay on as South Africa's director of rugby but relinquish head coaching duties, hopes the Boks can build on their World Cup win with a period of sustained success.
"When I took over, it was 618 days to the World Cup and we planned to the World Cup, to try and win the World Cup. I think it's now 614 days to the British and Irish Lions and we'll start planning now for the British and Irish Lions," he added.
"Obviously we have the Rugby Championship next year and Super Rugby and all the normal local competitions, but I think it's 614 days or close to that before the British and Irish Lions land in South Africa, so we'll start planning for that now.
"What we are trying to do is be consistent now. The thing we were terrible at in 2018, we were up and down. This year, we've played 12 games and we've lost one, so we're getting that consistency back.
"And yes, we've got the World Cup here, but going into next year, if you lose the first Test match people forget about the World Cup.
"So we want to get consistency now and work towards the British and Irish Lions, the next World Cup and so on."