Cairo - Stuart Baxter's days as South Africa coach appeared numbered after a limp group stage display left Bafana Bafana up against Africa Cup of Nations hosts Egypt, but a famous defeat of the title favourites has quietened his mounting detractors.
Despite scrabbling through in the final qualifying spot for the last 16, on the strength of a Bongani Zungu header in a gritty 1-0 win over Namibia, the focus back home centred on who would replace the 65-year-old with most convinced Mohamed Salah and co. were about to send South Africa packing in Cairo.
Former striker Benni McCarthy, the country's record goal-scorer and coach of top-flight Cape Town City, was being touted as a possible successor following 1-0 losses to Ivory Coast and Morocco, as Baxter's ultra conservative tactics prompted a public outcry.
Forward Lebo Mothiba had before the tournament boldly likened the team's training sessions to those of Barcelona, but such boasts seemed foolish as their cautious approach saw them fail to register shots on goal in two of three group games.
A refusal to play Thembinkosi Lorch, the 2018-19 player of the season in South Africa, did not sit well either but the well-travelled Baxter stuck to his instincts - belatedly introducing Lorch for the suspended Themba Zwane for the Egypt clash - and inflicted a "national disaster" on the shell-shocked host nation.
"The most important thing was to play a game I don't think Egypt expected us to play," said Baxter, whose nomadic career has taken the England-born coach to the likes of Sweden, Japan and Finland.
"I think the boys, you know we say sometimes African players can't be tactically smart ... but I think the players they showed a masterclass, it was excellent."
The jubilant mood was a far cry from that engulfing the squad just five days earlier after Mbark Boussoufa's 90th-minute goal threatened to knock South Africa out in the group stage.
But Bafana Bafana, who missed out of the 2017 edition, were the beneficiaries of the new format in an expanded 24-team field and seized upon their second chance to silence a staunchly pro-Egyptian crowd of 75,000, and in Baxter they perhaps had a personality better prepared than most to confront a challenge of such magnitude.
He first surfaced in South African football when he took the national team job in 2004, resigning the following year after a failed World Cup qualifying bid and returning to Vissel Kobe - a decade after his arrival for a first spell at the Japanese club coincided with the aftermath of an earthquake that devastated the city.
Rather than flee amid the trauma Baxter stayed put and guided the club into the top division, the experience leaving an indelible mark on a man who then led AIK to the Swedish title and an appearance in the Champions League group stage.
By the time South Africa came calling for a second time in 2017, after the dismissal of Ephraim 'Shakes' Mashaba for publicly criticising FA president Danny Jordaan, Baxter had captured a pair of league titles with Kaizer Chiefs following a spell in charge of Finland.
Officials reportedly wanted a big name replacement but were believed to be priced out of moves for Herve Renard and Hugo Broos, Cameroon's title-winning coach in 2017, and Baxter was eventually reappointed after a long delay.
A dismal showing in 2018 World Cup qualifying gave way to a much improved start on the road to the Cup of Nations, but after scaling the heights with a 2-0 win in Nigeria, Bafana Bafana plumbed the depths in a 0-0 draw with Seychelles.
Needing a draw against Libya to reach Egypt, Percy Tau scored twice as South Africa won 2-1 and Baxter survived, which he has done once more here by eliminating the hosts against the odds.
"I think we showed that we belong in this tournament, we showed we can be a tough opponent for everybody," Baxter said after South Africa's opening game. They are words he will hope again ring true against Nigeria in Wednesday's quarter-final.