Shinji Okazaki struck in the nick of time as Group B winners Japan wrapped up their World Cup qualifying campaign with a 1-0 victory over Iraq on Tuesday.
Japan, who qualified for Brazil last week with a 1-1 home draw to Australia, finished the final qualifiers with 17 points from the eight games with a goal difference of 11.
Iraq were eliminated from the qualifying with the defeat, as Japan exacted revenge for a last-gasp draw to the Gulf nation 20 years ago that denied them their first ticket to the World Cup finals.
Iraq's last match is next week, away to Australia who beat Jordan 4-0 at home to climb into second on this day.
"It's been a while since we'd won so I told the players to finish off with a victory," said Japan coach Alberto Zaccheroni, whose side had suffered back-to-back defeats to Jordan and Bulgaria before the Australia game.
"The heat and wind made things difficult but we did well enough to win tonight. I think we showed we have been a force to be reckoned with in this group."
"We wanted to go to the Confederations Cup with a win in hand because it does make a difference. What I always ask of Okazaki is to run and run toward the goal, and that's exactly what he did."
The Asian champions depart for Brazil early Wednesday morning to take part in the Confederations Cup. Japan face the hosts in the opening match in Brasilia on Saturday.
Iraq, who were in need of three points to keep their World Cup hopes alive, turned in a strong performance against a much-changed Japanese team to the one that drew with the Socceroos.
"It amazes me when I look at the table and see Iraq last in our group because they have so many talented players. The table sometimes does lie," Zaccheroni said.
Zaccheroni made five changes to the starting lineup that was without injured Keisuke Honda (right thigh) and suspended captain Makoto Hasebe, and the Iraqis had the better moments for a considerable part of the match.
The sandy wind and the heat, which topped 35 C at the kickoff time of 5:30 p.m., certainly didn't help Japan as the game was stopped twice for mandatory water breaks.
As the clock ticked away with neither side able to find the net, Iraq pushed up in search of the goal they desperately needed -- but were caught out with one minute remaining.
Okazaki led the break straight down the middle of the park before playing a one-two with Yasuhito Endo, who passed up a shot to unselfishly set up the Stuttgart striker.
Okazaki lost his balance but prodded in with an outstretched leg just inside the edge of the box as Japan won for the first time in four games.
"Obviously we really wanted to win," he said. "It was a great ball from Yatto-san (Endo). It was tough to make even one run in these conditions but I knew the ball would be coming back to me."
"We haven't completely overpowered Asia yet. We have a year left (until the World Cup) and have to show our strength and go all out for it."
Added Endo: "I was free and was going to go for it myself but made the right decision. We have the Confederations Cup next and hopefully the team can perform well."