Neco Williams spared Wales a frustrating draw at home to Bulgaria in the Nations League as the Liverpool teenager came off the bench to score the winning goal deep into injury time on just his second international appearance.
Ryan Giggs' side could only muster one shot on goal in a flat first half, with Bulgaria content to sit back and contain their opponents.
Wales played with more urgency after the break and, after David Brooks hit the post, it looked like their late pressure would be in vain against a dogged Bulgarian side 36 places lower than them in the world rankings.
But from a deep cross by fellow substitute Jonny Williams in the fourth minute of added time, 19-year-old right-back Neco Williams stole in at the back post to head into the net.
Victory extends Wales' unbeaten run to eight games and a second win from their opening two Nations League matches keeps them top of Group B4 with the Republic of Ireland at home to Finland in Sunday's other group fixture.
Williams savours Wales goal and targets England win As it happened: Wales 1-0 Bulgaria Having started the Nations League with a 1-0 victory in Finland on Thursday, Wales were unbeaten in seven matches and developing a defensive fortitude, which had seen them concede just three goals during that period.
And while Giggs was encouraged by the continued maturing of his young squad, there was room for improvement in attack.
No other team to qualify for Euro 2020 had scored fewer than Wales' 10 goals in their qualifying campaign, so a match against a Bulgarian side who had won only one of their previous 15 matches represented a big opportunity for Wales.
However, after a tentative start from both sides, it was the visitors who created the first chance, as Galin Ivanov cut inside from the left and curled a 20-yard shot narrowly wide of the far post.
Bulgaria were otherwise happy to drop deep and keep possession, untroubled by Wales as the game was played at a lethargic pace.
With domestic seasons only just starting, players on both sides still looked like they were playing themselves towards match fitness.
One was Gareth Bale, taken off at half-time in Finland as his lack of football with Real Madrid told, but finding pockets of space against Bulgaria which suggested he was gradually getting sharper.
The Wales captain hit a powerful free-kick straight at goalkeeper Georgi Georgiev and combined well with Brooks, who later volleyed wide, though it was clear Wales needed to improve on a sluggish first half.
In an attempt to inject some much-needed urgency into his team, Giggs turned to the bench after an hour.
He introduced West Bromwich Albion forward Hal Robson-Kanu - making his first appearances since 2017 having reversed his decision to retire from international football - and Liverpool defender Neco Williams, winning his second cap.
The hosts did then start to play at a snappier tempo, Daniel James playing a one-two with Brooks before forcing Georgiev with a curling effort.
The two players combined again five minutes later, James cushioning a crossfield pass from Bale into the path of Brooks, whose half-volley clipped the angle of post and crossbar.
That proved to be his final contribution before being replaced by Jonny Williams, and all three substitutes combined to salvage victory for Wales.
As the game entered its final minute of added time, Robson-Kanu held off Bulgarian defenders and laid the ball off to Jonny Williams, who sent an arcing cross towards the back post, where Neco Williams perfectly timed his run and headed the ball into the ground and then the net.
The relief and elation was etched on Welsh faces.
This was not a classic performance from Giggs' side - and neither was it on Thursday in Finland - but this young Wales team are developing a happy habit of finding a way to win.