Players and supporters alike in Japan were ecstatic after the Rugby World Cup hosts defeated Scotland on Sunday to book a place in their first quarterfinal.

"I think you can just look around and see how special a moment this is for our team and for this country," coach Jamie Joseph said after Sunday's 28-21 victory over Scotland.

International Stadium Yokohama (Nissan Stadium) erupted in rapturous cheering after the final whistle, with the win putting Japan at the top of Pool A, setting them up to face powerhouse South Africa a week later in Tokyo.

Masaharu Hirano, a 55-year-old supporter who was in the stands, attributed the win to team effort.

"Everyone played so well. This game was like a greatest hits. I never imagined (the Japanese team) would be able to hang with the best in the world."

Another fan, Yoshinobu Sakurai, 59, said emotionally, "Knowing how hard it used to be for Japanese rugby, I'm really happy to have witnessed such a historic game."

The support from the 67,666-strong crowd -- many clad in red and white jerseys and shouting "Nippon!" -- was "massive for us," said captain Michael Leitch.

Prime Minister Shinzo Abe took to Twitter to congratulate the team, saying the Brave Blossoms' ability to forge ahead under pressure "gave courage" to victims of Typhoon Hagibis, which just a day earlier flooded large swathes of the country and left more than 50 dead or missing.

Winger Kenki Fukuoka, who was chosen as man-of-the-match for his two tries, said, "We sacrificed all of our time for this. We were aiming to finish (the pool stage) with a win and to achieve that, it's the best feeling."

Reaching the knockout stages of Rugby World Cup for the first time on their ninth attempt, the match against South Africa -- the same opponent Japan beat for one of the biggest upsets in history in the pool stage of the 2015 RWC edition -- is poised to be an intriguing clash.

"We want to give it everything in the knockout stage. We want to rewrite history," Fukuoka said.