Jonathan Rodriguez scored a 90th-minute winner as Uruguay beat Costa Rica 2-1 in their international friendly on Friday.

Celso Borges thought he had earned a draw for Costa Rica in the 48th minute after cancelling out Giorgian De Arrascaeta's first-half penalty in San Jose.

However, Rodriguez came off the bench and netted a last-gasp winner for visiting Uruguay – who were playing in the absence of Luis Suarez and Edinson Cavani – at Estadio Nacional de Costa Rica.

There was a new face in the dugout for Costa Rica following Gustavo Matosas' shock resignation due to boredom.

After less than a year in the job, Argentine-born Uruguayan Matosas told a news conference on Wednesday: "I didn't know being a national team manager was so boring. I don't regret it and I don't leave frustrated because I gave my best. I won't manage a national team again. I can't only have the players every two months. It's not for me."

It was initially thought Matosas would take charge of Friday's friendly, however, interim boss Douglas Sequeira oversaw proceedings.

Borges' stunning free-kick three minutes into the second half gave Costa Rica something to celebrate after De Arrascaeta had converted a penalty three minutes prior to the interval.

However, Sequeira watched Costa Rica crash to their third consecutive defeat following Rodriguez's powerful low strike at the death.