Second-half substitute Daniel Sturridge scored in the 91st minute to earn England a 2-1 win over Wales in Lens.
Roy Hodgson's two second-half substitutes won the game as Jamie Vardy scored his first competitive England goal to cancel out Gareth Bale's first-half opener before Sturridge's strike at the death.
Bale had powered a long-range free-kick past Joe Hart to give Wales the lead in Lens, but Hodgson sent on Vardy and Sturridge at the break and saw that move rewarded.
The Leicester City striker grasped his first opportunity to score, before Sturridge pounced to seal a victory that England will feel they deserved after dominating possession and creating more chances as the match progressed.
England move top of the group on four points and will definitely reach the last 16 if they get at least a draw in their final match against Slovakia, who are level with Wales on three points.
Wales boss Chris Coleman made three changes, with fit-again goalkeeper Wayne Hennessey starting, but it was unchanged England who squandered a golden early chance as Raheem Sterling connected with Adam Lallana's cross but could only blaze over the crossbar.
Wales struggled to get out of their own half as England settled into a rhythm, and Gary Cahill should have tested Hennessey when Wayne Rooney's free-kick found him unchallenged in the box.
England had claims for a penalty turned down when Ben Davies appeared to handle in the area and Chris Smalling was inches away from scoring when he rose well to head a Rooney corner just wide.
But with only three minutes left in the first half, Rooney felled Hal Robson-Kanu 30 yards from goal and Bale struck the ensuing free-kick with such venom that Joe Hart could not keep it out, despite getting a hand on the ball.
ALSO READ: Wayne Rooney says Wales is more than Bale
Hodgson sent on Vardy and Sturridge for Kane and Sterling at the break, with their presence galvanising England, who went close when Rooney's shot was turned round the post by Hennessey.
Their pressure paid off when Sturridge crossed into a crowded box and Ashley Williams' backward header fell to Vardy, who slammed into the net from a few yards in the 56th minute.
Much of England's attacking threat came down the right with Kyle Walker causing Wales constant problems with his pace and Hodgson sent on Marcus Rashford as his side pressed for a winning goal.
Wales put their bodies on the line and Jonathan Williams and James Chester did well to block a smart Rooney shot before the winner arrived a minute into stoppage-time.
Hodgson's men broke into the Wales penalty area and Dele Alli's flick-on was driven inside the near post by Sturridge, prompting wild celebrations on the England bench and in the stands.
Key Opta Stats:
- England have won a game at a major tournament for the first time having been behind at half-time.
- Daniel Sturridge is the 10th England player to score at both the World Cup and the Euros.
- The last three players to score against England from a direct free-kick at a major tournament are Ronaldinho (2002), Zinedine Zidane (2004) and Gareth Bale (2016).
- Wales scored with their first shot on target.
- Jamie Vardy has scored four times in his last five games for England. He netted with his third touch in the match.
- Marcus Rashford is the youngest player to play at the Euros for England (18y 228d), four days younger than Rooney in 2004 (v France). He is the fifth youngest overall.