Costa Rica and Honduras will play off in the final of the Copa Centroamericana tournament on Monday.
Costa Rica reached the final by beating Panama 4-2 on penalties in their semi-final after the two countries were locked at 1-1 after extra time.
Midfielder Celso Borges had put the eventual winners ahead in the 67th minute only for striker Blas Perez to equalise for Panama nine minutes later.
Honduras had an easier path to the final, beating El Salvador 2-0 with goals by defender Johnny Leveron after 78 minutes and substitute Marvin Chavez on the full-time whistle.
In the earlier game, Guatemala beat Nicaragua 2-1 to take fifth place.
Midfielder Feliz Rodriguez gave Nicaragua the lead after 24 minutes before substitute Gregory Ruiz equalised on the stroke of half-time. Midfielder Manuel Leon scored the winner in the 66th minute.