Japan kept alive their hopes of reaching the knockout stages of the Rugby World Cup on Thursday as they beat Samoa 28-22 in front of 31,794 fans at a hot and muggy Stadium de Toulouse.

The result, which sees England qualify for the quarterfinals as Pool D winners with a game in hand, moves the Brave Blossoms into second place on nine points, five ahead of Argentina, who are overwhelming favorites to win their third game of the pool stage against Chile on Saturday.

Japan's Pieter "Lappies" Labuschagne (C) scores a try during the first half of a Rugby World Cup Pool D match against Samoa in Toulouse, France, on Sept. 28, 2023. (Kyodo)

Japan and Argentina will meet in Nantes on Oct. 8 with the winner likely moving on to the last eight.

Inspired by Lomano Lava Lemeki with ball in hand, and despite the late withdrawal of scrum-half and vice-captain Yutaka Nagare, the Brave Blossoms withstood wave-upon-wave of Samoan runners to win the do-or-die clash.

Lemeki's man-of-the-match performance continued a triumphant comeback for a player brought into the World Cup squad after a long absence from test rugby.

"It's pretty unbelievable. I thought the dream was long gone two years ago," Lemeki said. "To get the call-up after the season just gone as a backup, I thought half a chance is better than no chance and just ran with it, and here I am again."

In a tight first half, good breaks from Lemeki set up Pieter "Lappies" Labuschagne and Michael Leitch for tries, with Rikiya Matsuda adding the extras to both from out wide and adding a penalty for good measure.

But Samoa kept themselves in the game through a penalty by Alai D'Angelo Leuila and a try by Seilala Lam, as the teams turned around with Japan leading 17-8.

It could have been closer, though, as it was only rugged defense by the Brave Blossoms that kept the Samoans from making the most of their considerable advantage in terms of possession and territory.

"They got on top of us at times and we had to really keep at it for the whole game," Japan head coach Jamie Joseph said. "The commitment was certainly there but there are one or two things to work on for next week."

With Samoa down to 14 men following a yellow card to Ben Lam that was later upgraded to red, Japan stretched their lead nine minutes into the second stanza through Kazuki Himeno following a well-worked driving maul and a second penalty by Matsuda.

"It's tough playing a game against 15 men and to be down a man with the red card," Samoa head coach Seilala Mapusua said. "Unfortunate for Ben, it was just one of those contacts in the game."

Kanji Shimokawa (R) and Warner Dearns of Japan tackle a Samoan player during the second half of a Rugby World Cup Pool D match in Toulouse, France, on Sept. 28, 2023. (Kyodo)

Samoa closed the gap when Duncan Paia'aua crossed the chalk in the 65th minute. But a further penalty to Matsuda, who has missed just one kick at goal all tournament, meant Samoa needed two converted tries in the final five minutes to steal the win.

They managed one through Christain Leali'ifano, but the second was beyond them as the Japan defense held out.

Samoa captain Fritz Lee said his side had to "respect the ball more" after they made a number of costly mistakes.

"The effort was there, just the little things we didn't capitalize on, the basics of the game. Japan were more clinical than us," he said.

Matsuda said he would put in extra practice on the kicking tee after his solitary miss, following Himeno's try, enabled Samoa to come within a converted try of the Brave Blossoms at the end.

"I'm always aiming for 100 percent and I missed one today," he said. "I don't think the game would have gone like that at the end had I scored it so I'll keep working."

Kazuki Himeno (3rd from L) is pictured after Japan defeated Rugby World Cup Pool D opponents Samoa 28-22 in Toulouse, France, on Sept. 28, 2023. (Kyodo)

Related coverage:

Rugby: Team effort is key to beating Japan, say Samoa

Rugby: Japan ready to "fight for one another" in crucial Samoa game

Rugby: Japan make 2 changes to starting XV for crucial Samoa clash