Georgia Stanway’s winner threw the Amex Stadium into a frenzy after Sarina Wiegman’s team had trailed until the 84th minute of regular time.
After 95 minutes, England had its first lead, and the crowd began singing Football’s Coming Home as Stanway dashed to the corner to celebrate.
Substitute To overturn Esther Gonzalez’s first goal, Ella Toone of Manchester United volleyed in Alessia Russo’s flick-on, setting up a tense finish in stoppage time.
Spain continued to pose a danger until the final whistle, but England had momentum on their side and took advantage of the Brighton crowd getting up and cheering.
The eventual win for the hosts ensured that they advanced to the semifinals of a major women’s competition for the fourth time in a row, and their impressive undefeated streak under Wiegman now stands at 18 games.
READ MORE: Bayern Munich sign de Ligt for £65.6m
The Lionesses are now among the favorites to win the trophy at Wembley on July 31 for the first time, but they must defeat either Sweden or Belgium in the semifinals to get there.
For the third time in a row, Spain exits the competition in the quarterfinals.