Manchester United striker Shinji Kagawa scored the go-ahead goal in the 80th minute on Monday as Japan defeated Costa Rica 3-1 in a 2014 FIFA World Cup™ warm-up friendly for both teams.

Kagawa stumbled as the ball came to him in the heart of the penalty area but kept his balance and swept a right-footed shot past Costa Rica goalkeeper Keilor Navas to give Japan a 2-1 edge. Yoichiro Kakitani, who came off the bench in the 76th minute, added an insurance goal in stoppage time for Samurai Blue.

"It was good that we could come back and win after we fell behind," Kagawa said. "We should have scored a goal in the first half. We had good chances. We need to score first in the World Cup because those are going to be tough matches."

Costa Rica captain Bryan Ruiz, a striker for Dutch side PSV, opened the scoring in the 31st minute, outracing Japan defender Yasuyuki Konno to a centering pass and flicking the ball into the back of the net. But Yasuhito Endo, a 34-year-old midfielder for Gamba Osaka who entered to start the second half, equalized for Japan in the 60th minute.

Japanese captain Keisuke Honda left-footed a centering pass to the heart of the penalty area, where onrushing Endo - the oldest man on either roster - blasted a shot into the back of the net.

"Our condition was good and we played with a positive mentality," Japan coach Alberto Zaccheroni said. "For the rest of the time until the World Cup we will focus on improving the players' mentality and on finishing goals. Kagawa and Honda, they played well. They both needed some time to get used to the game but they played well."

We had our World Cup rhythm. We were counter-attacking and moving the ball well, a high pressure, a World Cup feel.

Costa Rica coach Jorge Luis Pinto

Costa Rica coach Jorge Luis Pinto said the match had World Cup-level intensity. "We had our World Cup rhythm," Pinto said. "We were counter-attacking and moving the ball well, a high pressure, a World Cup feel. We played as intensely as we could."

But Zaccheroni said Japan's attacking style paid off at the end by draining the Ticos of energy for the vital final minutes. "We made a lot of chances," he said. "We kept making them run and pass the ball and they got tired and we dominated the game - eventually."

After a last tune-up on Friday in Tampa against Zambia, Japan will fly to Brazil on Saturday and open Group C on 14 June against Côte d'Ivoire with later matches against Greece and Colombia.

Costa Rica, which plays a final warm-up friendly against Republic of Ireland on Friday at Philadelphia, was drawn into Group D against England, Uruguay and Italy. The Ticos open their World Cup against Uruguay on 14 June.

"We were able to create but our middle was exposed and certainly the defence made some bad decisions on the second and third goals," Pinto said. "We made some mistakes. It's a process. Some of our players will look to improve in the next week. "

Japan hoped to gain some insight into Colombia by facing a Costa Rican side guided by Colombian Jorge Luis Pinto, who once coached his homeland's squad. Costa Rica sought similar information about Italy from playing against Japan, coached by Italian Alberto Zaccheroni.

And both teams hoped to adapt to the heat and humidity of Brazil by playing in similar conditions before 7,106 at the Florida home stadium of American football's Tampa Bay Buccaneers.

Costa Rica, reeling from the loss of star scorer Alvaro Saborio to a broken right foot and left back Bryan Oviedo to a broken leg, tested new starters. Joel Campbell, the Olympiacos striker who at 21 was the youngest man on the pitch, got the nod up front while Junior Diaz, a 30-year-old for German side Mainz, received the back line call.

Japan open brightly
Time and again the Asian champions pressed the attack in the first half only to come away empty. Each team created solid scoring chances early but Ruiz was wide right in the opening seconds, Yoshito Okubo fired high of the goal in the second minute and Yeltsin Tejeda's blast from atop the penalty area was denied by Japan goalkeeper Eiji Kawashima in the third.

Yuya Osako nodded a centering pass over the crossbar in the 11th minute and moments later Kagawa evaded defender Michael Umana in the middle but fired a right-footed shot wide. Honda blasted a shot off the right post in the 24th minute and Okubo forced a diving stop by Navas in the 25th.

Honda was again thwarted in the 27th minute after evading Navas, who had strayed far from the goal to challenge him. Ticos defender Giancarlo Gonzalez beat Honda to the ball and cleared it from danger before the blonde Japanese star could take aim at the open net.

Hotaru Yamaguchi forced another tough save by Navas in the 29th minute and Kagawa yet another in the 41st minute. Kawashima came to the top edge of the area and leaned over the line to head away a danger ball on a Ruiz breakaway in the 44th minute, the Costa Rica star eventually sending a header wide to end the threat.