Away from home, and against a Spanish side in scintillating form under their new coach Luis Enrique, this was certainly England's best win under Gareth Southgate and, perhaps, their most impressive since thrashing Germany 5-1 in Munich in 2001.
Marcus Rashford was the other scorer in a breathless opening 45 minutes, which witnessed Spain conceding three on home soil for the first time in their history.
“To play the way they did, this should be a great reference point for this team for the future,” Southgate said.
Paco Alcacer, on as a substitute, headed in before the hour to spark hopes of a comeback but England were home and dry by the time Sergio Ramos scored in the 98th minute, with the last action of the match.
It means England keep alive their hopes of finishing top of Group 4 in the UEFA Nations League, the position Spain had needed only a point to all-but-guarantee would be theirs.
It was a night for streaks ending and records tumbling. Sterling's opening goal was his first in 1,102 days for England, even more remarkable given he added his second 22 minutes later.
“The only thing we did say is when he scores he will score again,” Southgate said. “He managed to do so pretty quickly.”
The last time England won away against Spain was 1987 — which was also when they last scored against Spain away from home, Gary Lineker on target.
With an average age of just over 23, this was also the youngest England starting line-up in the 21st century. That will be the most exciting aspect for Southgate.
For Spain, Alcacer now has an astonishing 10 goals from his last 10 shots on target. But defeat represents something of a reality check. “Waving the flag for goals,” read Marca's front page on Monday. They had scored 12 in three games since Luis Enrique took charge.
“Clearly it wasn't our night,” he said. “We have made mistakes on an individual level and their goals were medicine for them and poison for us.”
But Eric Dier set the tone early on. He left Sergio Busquets, sluggish throughout, hopping out of his first pass and then slid through Ramos, who was also out of sorts.
After a frantic start, England settled and in the 13th minute, scored.
Under pressure at the back, they kept the ball until the risk was too great and Jordan Pickford drove forward to Harry Kane.
With Spain caught upfield, he was able to turn and find Rashford, whose quick switch set Sterling free. He finished into the top corner.
“We are staying up,” sang the away support as Thiago Alcantara danced around England's midfield with flicks and tricks. But to little effect.
Instead, Kane showed the value of a top-class centre forward for England's second. He outmuscled Ramos to win Pickford's punt downfield, outpaced Nacho to the loose ball with a superb reverse pass in behind. Rashford only had to finish.
Spain's early confidence was gone and England added a third before the interval, which was greeted by whistles from the home fans.
Ross Barkley's sumptuous ball over the top caught Ramos napping again and Kane squared for Sterling to tap in. “Are you Scotland in disguise?” came the taunt from the corner.
Spain were sent out early for the second period, among them Alcacer, who replaced Saul. He scored with his first touch, heading in Marco Asensio's corner, given away after a fumble by Pickford.
It was a nightmare few minutes for England's goalkeeper, who then dallied and was tackled by Rodrigo.
Pickford scrambled the ball away but probably fouled Rodrigo in the process and Spain were adamant they deserved a penalty. The referee was not convinced.
England played for time, with a handful of players going down injured, and Spain's pressure gradually eased. Rodrigo shot wide in the final 10 minutes.
Asensio went even closer.
Marcos Alonso then deflected onto the bar deep into injury time and Ramos headed home in the 98th minute. But there was not even time for a restart. England's win was complete.
By AFP's Thomas Allnutt