Carlos Queiroz confirmed on Monday he was leaving his job as coach of Egypt's national team, ending speculation he would stay on despite failing to lead them to the World Cup finals.
Portuguese Queiroz, 69, had a six-month contract with Egypt, taking over in September to steer them through the group phase of the World Cup qualifiers and into a two-legged playoff last month which they lost on penalties to Senegal to miss out on a place at this year's tournament in Qatar.
Queiroz took Egypt to the Arab Cup semifinals in Qatar in December with a team made up of home-based players and in February, with a full squad, they reached the Africa Cup of Nations (AFCON) final in Cameroon, only to lose to Senegal on penalties.
"To All, The Egyptian fans; Our supporters; My friendly and magical staff dream team; And to my wonderful players; Every new beginning that starts with one painful farewell, means that our hearts are full of gratitude, respect, and friendship. Those are my feelings right now," Queiroz wrote on Twitter.
The Egypt Football Association said it had talked to Queiroz and had agreed to part ways.
It will look to appoint a replacement before the start of the next Cup of Nations qualifiers in June.
Egypt were the sixth national team Queiroz coached in his long career, which also includes stints as manager of Real Madrid and assistant to Alex Ferguson at Manchester United.