(CNN)Trailing Spain 1-0 with six minutes of regular time left, England seemed to be exiting its home Women's Euro until Ella Toone knocked home an equalizer that lifted a raucous, record crowd of 28,994 spectators inside the Brighton and Hove Community Stadium to their feet and dragged the quarterfinal to extra time.
Women's Euro 2022: England beats Spain 2-1 in a dramatic extra-time performance
Then, six minutes into the first extra period, Georgia Stanway was given an inch of space by the Spanish defense and fired the Lionesses into the semifinals with a sensational strike that sealed a 2-1 victory.
"That's the shift from group mentality to knockouts. We've proved we're resilient and can overcome tests," England's captain Leah Williamson told the BBC.
"Sorry to Mum and Dad that you have work tomorrow and I've delayed you returning home. I'm sorry to the whole nation, but I hope you're buzzing like me."
England's Euro campaign had been flawless, topping its group without conceding a goal and achieving a record victory against Norway.
But Spain's trademark tiki-taka passing ensured that it dominated the first half, starving the Lionesses of possession and any chance to unleash their free-flowing attack.
On 17 minutes, La Roja engineered its first shot on target as Mariona Caldentey curled in a shot from outside the penalty box which was scooped up by England goalkeeper Mary Earps.
Twenty minutes later, it looked as if Ellen White had scored for England against the run of play, prodding in a goal from a Lauren Hemp free kick, but her effort was ruled offside.
That sparked a late flurry of English attacks, but Spain's defense held out and the first half ended goalless.
Spain began the second half brightly and took the lead when substitute Athenea del Castillo foiled Rachel Daly, zig-zagged into the box and set up Esther González who fired a goal into the corner of the net.
In response, England's tactics shifted, and head coach Sarina Wiegman brought on Alessia Russo and Toone to stem Spain's advance.
Earps' outstretched fingertips deflected a powerful shot from Del Castillo to keep the Lionesses' hopes alive before Russo and Toone combined on 86 minutes to equalize and push the match to extra time.
"We used Plan B," Wiegman told the BBC. "We scored quickly after doing that so we could go back into our normal shape. I'm so proud of the team. The fans behind us, you could feel it. This is home advantage."