(Reuters) - Every rule has an exception and it seems that Herve Renard was the outlier for the Saudi Arabian Football Federation (SAFF) - a coach allowed to leave the national team job on his own terms with his reputation enhanced.
Little more than four months after overseeing possibly the greatest upset in World Cup history, the 54-year-old is packing his bags and heading home to guide France at this year's Women's World Cup.
The highlight of his spell in charge was undoubtedly that heady night in Qatar last November when the Saudis stunned eventual winners Argentina 2-1 in their opening match at the first World Cup held in the Arab world.
What followed after the euphoria of that victory was more familiar fare for Saudi football fans, however, losses to Poland and Mexico and departure from the tournament in the group stage.
Remarkably, though, the Saudi federation did not immediately fire the Frenchman.
Coaches have never enjoyed much job security in Saudi Arabia and the SAFF has been known to replace them even in the midst of a tournament.
Renard took over Saudi Arabia in July 2019, and if he had seen out his contract in 2027 he would have been the longest serving national team coach in the country's history.
As it is, he enjoyed the longest spell of the dozens of coaches who have taken charge of the Green Falcons since Egyptian Abdul-Rahman Fawzi in the 1950s and early 1960s.
His departure, when it came on Tuesday, was amicable. An approach by the French Football Federation to the Saudis, a legal agreement over his contract, and even a farewell video to fans on the SAFF Twitter account.
"We achieved great success in the qualifiers, we topped the group ahead of Japan and Australia, and we qualified for the World Cup," Renard said.
"We had a great experience, and the Argentina match will remain immortal in the minds of the Saudi fans."
There were messages from Saudis to Renard too.
"Our coach and teacher, Herve Renard," Salem Al-Dawsari, who scored the winning goal against Argentina, posted on Twitter.
"Thank you for every moment you spent with us, thanks for every effort you made for us, and thanks for everything you gave us."
The former Morocco, Zambia and Ivory Coast coach took Saudi Arabia from 68th in the FIFA rankings to inside the top 50 at 49th.
SAFF President Yasser Al-Misehal said there was no hurry to replace Renard with no matches scheduled until at least September, when the team will start its preparations for the new World Cup qualifying campaign and next year's Asian Cup.
"We won't choose the successor until June," he said. "The Saudi national team is an ambitious and great team and we will certainly be coveted by many distinguished coaches."
Renard will now turn his mind to coaching women for the first time but he made it clear he would not forget his time in Saudi Arabia.
"I wish you success in the 2024 Asian Cup in Qatar. I will support you, and certainly if I could be present in the stands, I would be a fan of the Saudi national team," he said in his farewell video.
"You will always remain in my heart."
(Reporting by Osama Khairy and Shady Amir, editing by Nick Mulvenney and Peter Rutherford)