Costa Rica missed a penalty as they drew with World Cup co-hosts Japan in a friendly in Yokohama on Wednesday.
The missed spot-kick, by Ronald Gomez in the 54th minute, looked costly when Japan took the lead on 70 minutes.
Kashiwa Reysol midfielder Tomokazu Myojin broke the deadlock with a fortunate goal, but it was no more than the hosts deserved.
However, within seven minutes Costa Rica were back on level terms after Winston Parks, who had been on the pitch less than 10 minutes, scored from close range.
Defeat would have been a cruel blow for Japan as they dictated much of the game.
Coming into the match off the back of two wins they played the better football throughout, despite the absence of their European stars Hidetoshi Nakata, Shinji Ono and Junichi Inamoto.
But they found no reward for their positive approach until Myojin hit the back of the net midway through the second half.
He sliced a right-wing cross over goalkeeper Erick Lonnis to the delight of the 65,000 fans at the International Stadium and finally ignited the game as a sporting spectacle.
But Parks silenced their celebrations when he was allowed to skip through the Japan defence before scoring with a fierce shot from close range.
Moments later Akinori Nishizawa almost restored Japan's lead only to see his glancing header come back off the post after a superb cross from Brazilian-born midfielder Alessandro Santos.
In only his second match for his adopted country, Santos wreaked havoc on the left flank, creating numerous chances for his attackers and it was their profligacy which ultimately cost Japan the game.
Kashima Antlers striker Takayuki Suzuki was the chief culprit, missing the target with three close-range headers in quick succession after the interval.
Japan's coach, Philippe Troussier, said he was satisfied with the result.
"Our players showed a lot of toughness both mentally and physically," he said.
Costa Rica, missing Paulo Wanchope, Hernan Medford and Reinaldo Parks, will look to build on this performance in their next match in the Far East against South Korea on 20 April.
Japan, who co-host the World Cup with South Korea, play Belgium, Russia and Tunisia in World Cup Group H.
Costa Rica will face Brazil, China and Turkey in Group C.
Japan: Seigo Narazaki; Tsuneyasu Miyamoto (Shunsuke Nakamura 82), Naoki Matsuda, Koji Nakata, Alessandro Santos (Toshihiro Hattori 80), Kazuyuki Toda, Tomokazu Myojin (Yasuhiro Hato 81), Mitsuo Ogasawara (Hiroaki Morishima 26), Daisuke Ichikawa (Takashi Fukunishi 46), Takayuki Suzuki (Tatsuhiko Kubo 87), Atsushi Yanagisawa (Akinori Nishizawa 30)
Costa Rica: Erick Lonnis; Mauricio Wright, Luis Marin (Alexander Madrigal 46), Harold Wallace (Daniel Vallejos 77), Gilberto Martinez, Wilmer Lopez (Oscar Rojas 68), Mauricio Solis, Walter Centeno (Max Sanchez 77), Juan Jose Rodriguez, Ronald Gomez (Steven Bryce 84), Rolando Fonseca (Winston Parks 68)
Referee: Huang Junjie (China).