Sam Davies admitted it was a case of "hero or villain" after his drop-goal in the dying seconds spared Wales' blushes against Japan.
Davies, a second-half substitute, struck 10 seconds from the end of normal time to edge Wales home 33-30 at the Principality Stadium.
Dan Lydiate, Jamie Roberts and Sam Warburton scored tries, while wing Leigh Halfpenny kicked 15 points as Wales triumphed, yet it was a performance that lacked consistency and finesse - and almost produced a colossal upset.
Japan looked a far more threatening outfit with ball in hand as wings Akihito Yamada and Kenki Fukuoka, plus substitute Amanaki Lotoahea, claimed touchdowns, with fly-half Yu Tamura adding three penalties and two conversions and centre Timothy Lafaele converting Yamada's try.
Wales boss Rob Howley made 10 changes following last weekend's hard-fought win against Argentina, throwing down a selection gauntlet ahead of next week's autumn finale against struggling South Africa.
But few players stood up to be counted as Wales did just enough to make it nine wins from 10 against Japan.
Davies said: "The mood in the camp is a bit down at the moment. We would liked to have won the game a bit more comfortably than that.
"Personally, I had a job to do at the end, and thankfully I did it. The forwards did a good job getting the ball back, and set a good platform for me to put the ball over.
"You practise for those situations week in, week out, and today it went over. It was hero or villain today, and thankfully I was the hero.
"They are the kind of kicks you visualise, but as a whole we are not pleased with the performance."
Howley conceded that Wales were fortunate, adding: "I thought Japan were the better team today. They deserved to win.
"Throughout the game we fuelled Japan's enthusiasm and energy. We couldn't get out of our own half in the second half.
"We fuelled their counter-attack. As I said to the players, while we come away with the win, it certainly felt like a loss. Japan will deserve the accolades they will get, but we got past the winning post.
"We lost the aerial battle. Japan's kicking game put us under pressure and we lost territory. They took their tries particularly well.
"In fairness to Japan, they had the skill, energy and enthusiasm and they were unfortunate not to win the game."
Howley paid tribute to Davies, who impressed on his Test debut against Australia a fortnight ago and was winning only a second cap.
"I am delighted for Sam," he said. "He came on against Australia and made a positive impact, and he showed great composure.
"The way he struck the ball for the drop-goal was fantastic. It was a great drop-goal."
South Africa, beaten by Italy on Saturday, are next up for Wales in seven days' time and skipper Warburton said: "South Africa are going to come to us and throw everything at it.
"I imagine they will throw the kitchen sink at us and I am sure we will definitely see a reaction from them.
"But if we can finish this campaign with three wins from four, then I guess we've had a successful campaign."
Reflecting on his team's performance, Japan head coach Jamie Joseph said: "I think we surprised Wales and their fans how we played the game.
"A fair result would have been a draw, and the players are disappointed to have come up short."