After a quiet opening, Tonga paid the price for conceding a series of penalties when Japan forced their way over the try-line from a maul after seven minutes, prop Masataka Mikami claiming the score, with scrum half Shuhei Oshima narrowly missing the conversion.
Tonga responded with several forward attacks but the Japanese defence held firm with strong tackling. However, the line could not be held indefinitely, and with half-time approaching, Tonga second row Sotele Hehea found his way over the line to level scores at the interval.
Tonga dominated the second half but failed to take advantage of the possession they enjoyed and struggled to break through the dogged Japanese defence. They forced several penalties out of the Japanese, but failed to take advantage, with fly half Sione Toke missing two penalties.
With extra time looming, Tonga finally managed to pierce the Japanese defence, replacement Haloti Molitika making an excellent break to put Tonga in the driving seat at 10-5 with five minutes remaining.
Fellow replacement Tone Tukufuka completed an interception try from the halfway line for Toke to convert and complete the scoring.
Tonga now face the winner of the USA v Fiji match in the play-off for 13th place on Saturday.
Tonga Coach Fe’ao Vakata commented: “We are very pleased with the result. We had the majority of the territory, but throughout the tournament we have struggled to convert that into points, and missing so many kicks didn’t help either. We’re looking forward to Saturday’s match.”
Whilst opposite number, Japan Coach Masahiro Kunda, said: “I pay tribute to the Tongan game plan. They kicked a lot of high balls that we struggled to cope with. They are a very physical side but I thought our tackling and scrummaging were excellent.”