A last-minute drop-goal from replacement fly-half Sam Davies helped save Welsh blushes on Saturday as they edged Japan 33-30 in Cardiff.
It looked like the Brave Blossoms had snatched a draw when Yu Tamura converted Amanaki Lotoahea's 74th minute try, but Wales went down the other end of the field, with Davies showing composure to slot the three points.
Wales will now go into their game against South Africa at least with a win under their belt but their performance left a lot to be desired.
They led 14-13 at the turnaround but handed seven points to Japan late in the half to give the Brave Blossoms hope of a shock victory. Japan do deserve credit though as they remained in the match almost throughout.
Tamura put Japan 0-6 in front by nine minutes, via two penalties, but Wales then moved ahead thanks to Dan Lydiate crossing wide out. Leigh Halfpenny made no mistake with the conversion as it had become 7-6.
The majority of those points came whilst Wales full-back Liam Williams was in the sin-bin for blocking so the hosts had to be pleased.
With Williams back on the field, Wales set about extending their lead and did just that on 23 minutes when Jamie Roberts went over after a strong initial carry from Jonathan Davies. Halfpenny made it 14-6.
That would've been a somewhat pleasing half-time scoreline for Wales after such a sluggish start but when Gareth Anscombe's offload was gathered by Akihito Yamada, who set off for the line from his own half, just one point separated the two teams in the dressing rooms.
Halfpenny made it 17-13 two minutes after the break with a penalty and 10 minutes later the lead was up to 11 points when Sam Warburton crossed after a bust from Alun-Wyn Jones. Japan's hopes looked to have been ended.
But two minutes later Kenki Fukuoka finished well on the left wing and with Tamura's touchline conversion, it was now 24-20 to Wales.
Halfpenny made it 27-20 on the hour mark before Tamura and the Welsh wing then traded efforts for 30-23 with just 10 minutes to play.
Then came the levelling score from the Brave Blossoms as replacement Lotoahea's try was converted by Tamura, with Wales needing to dig deep to prevail, which they did via Davies' cool drop-goal with seconds to play.
The scorers:
For Wales:
Tries: Lydiate, Roberts, Warburton
Cons: Halfpenny 3
Pens: Halfpenny 3
Drop-Goal: S Davies
Yellow Card: Li Williams (8 min)
For Japan:
Tries: Yamada, Fukuoka, Lotoahea
Cons: Tamura 2, Lotoahea
Pens: Tamura 3
Wales: 15 Liam Williams, 14 Leigh Halfpenny, 13 Jonathan Davies, 12 Jamie Roberts, 11 Alex Cuthbert, 10 Gareth Anscombe, 9 Lloyd Williams, 8 James King, 7 Sam Warburton (c), 6 Dan Lydiate, 5 Alun Wyn Jones, 4 Cory Hill, 3 Samson Lee, 2 Scott Baldwin, 1 Nicky Smith
Replacements: 16 Kristian Dacey, 17 Rhys Gill, 18 Scott Andrews, 19 Jake Ball, 20 Ross Moriarty, 21 Gareth Davies, 22 Sam Davies, 23 Keelan Giles
Japan: 15 Kotaro Matsushima, 14 Akihito Yamada, 13 Timothy Lafaele, 12 Harumichi Tatekawa, 11 Kenki Fukuoka, 10 Yu Tamura, 9 Fumiaki Tanaka, 8 Amanaki Mafi, 7 Shunsuke Nunomaki, 6 Malgene Ilaua, 5 Samuela Anise, 4 Kyosuke Kajikawa, 3 Kensuke Hatakeyama, 2 Shota Horie, 1 Satoshi Nakatani
Replacements: 16 Takeshi Hino, 17 Koki Yamamoto, 18 Heiichiro Ito, 19 Uwe Helu, 20 Shuhei Matsuhashi, 21 Yuhimaru Mimura, 22 Keisuke Uchida, 23 Amanaki Lotoahea
Referee: Marius van der Westhuizen (South Africa)
Assistant Referees: John Lacey (Ireland), Craig Maxwell-Keys (England)
TMO: Eric Gauzins (France)
The win means that England have now gone 11 games unbeaten and have won every game under Eddie Jones. Fiji who were trying make up for a 40-7 clobbering at the hands of the Barbarians last weekend continue their losing run.
So, this is what rock bottom looks like. Or perhaps the Springboks were already there and didn't realise it. South Africa's downward spiral is now complete. Allister Coetzee must fear for his job.
As the scoreline suggests, this was a tight contest and the home side's forwards deserve plenty of credit for the result as they laid the platform to victory with a dominant display in the tight exchanges.
Chiefs wing James Lowe was a double try scorer for the touring side with back-to-back efforts for Colin Cooper's side, who raced out into a 26-3 lead.
It was a hard-fought win for the home side as the Canadians shocked the Irish with a perfectly timed interception from Canada winger DTH van der Merwe and a roll over try from Taylor Paris to make the 14-14 half an hour into the game.
The home side dominated for large periods and should have won this match by a much bigger margin, but they made several mistakes and were lucky to secure victory in the end.
Les Bleus scored seven tries to Samoa's one to extend their unbeaten run over the Island nation after three previous meetings all ending in a French triumph.
In an entertaining and hard-fought encounter, the home side dominated for large periods against a Wallaby side who battled to get going and committed a plethora of errors on attack before a late Tevita Kuridrani try, which Bernard Foley converted, secured them the result.
Pat Lambie’s boot opened up an early 6-0 lead for the Springboks, however as the minutes ticked over England grew stronger, leading 20-9 at half-time thanks to tries from Jonny May and Courtney Lawes combined with the boots of Owen Farrell and Elliot Daly.
Italy had to face the anger of the world champions who bounced back strongly after that defeat in Chicago. It was a comprehensive win for the All Blacks,who outscored their hosts by 10 tries to one in the end.
As the scoreline suggests, this was a thrilling affair with both sides giving their all to secure the result and the lead changed hands on four occasions.
Munster opened the scoring through Rory Scannell inside the first 15 minutes but Ian Keatley failed to add the extras.
This game was won in the first half in an entertaining game despite being played in heavy rain.
The famous invitation club came to celebrate the host union's 90th anniversary at the Marketa Stadium, the first game televised by state TV in the country.
It was Ireland's first win over the All Blacks in 29 Tests since 1905 and not only breaks 111 years of disappointment, but also brings to an end New Zealand's Tier-1 Test record of 18 consecutive wins.
Australia's ambitious quest for a Grand Slam had the perfect start as they outscored Wales with five tries to one.
They led 21-6 at half-time thanks to tries from Matías Moroni and Nicolás Sánchez, with Sánchez kicking three penalties and a conversion.
James Lowe (2), Akira Ioane (2), Ash Dixon, Kane Hames, Brad Weber and Joe Royal scored the tries while Ihaia West and Marty McKenzie kicked goals.
The win means that they finally break the 17-match streak that was only held by themselves and South Africa previously and extend it to 18. The All Blacks were on the cusp of making the record last year before Australia beat them 27-19 in Sydney.
48,515 fans were in attendance for a fixture that the Pumas will have nightmares over as they lost a game they probably should have won.
This was as one-sided a game as you will see at Test level.
The comfortable nature of the win came as a result of a four-minute spell at the end of the first half that saw the visitors score three tries.
An accomplished kicking display from Morne Steyn, who scored all his team's points, guided the home side to victory although the Wallabies scored the game's only try early in the first half when Scott Sio went over the whitewash.