"Sometimes it is very difficult to leave a place where your heart is and this is what happens to me with the Panama national team, where I put my heart, work and effort to achieve a dream," Gomez wrote in his farewell letter published on the Panamanian Football Federation's website.

The 62-year-old took charge of Panama in 2014 and steered the team through a qualifying campaign that saw the country with a population of about 4 million book a spot at this summer's World Cup in Russia.

Panama failed to reach the knockout stage of their maiden tournament after losing all three of their Group G games as they conceded 11 goals and scored just one in the process.

Gomez had previously guided Colombia to the 1998 World Cup finals before also leading Ecuador to their first World Cup appearance in 2002. The Colombian specialist now takes over from Jorge Celico for his second spell at the helm of Ecuador.