Super sub Ferran Torres’ 106th minute goal was enough to separate the sides in a cagey affair in New Jersey.
Argentina could not repeat the heroics from four years ago when they lifted the trophy against France, and were faced with an uphill battle after Enzo Fernandez was sent off.
Billed as a box-office final between the South American and European champions, what transpired was a defence versus attack exercise as the holders showed spirit but precious little else.
Argentina were unable to eke out an equaliser having been a pale imitation of the team that broke England’s hearts in Wednesday’s semi-final.
Tempers frayed as the final whistle sparked Spanish celebrations and surely called time on 39-year-old star Messi’s last World Cup match.
US President Donald Trump was among the star-studded crowd at MetLife Stadium, where the closing ceremony was packed with so much American razzmatazz that kick-off was delayed by five minutes.
Faltering Argentina failed to muster a shot across 90 minutes and only Emiliano Martinez’s heroics kept Spain at bay, with the goalkeeper preventing teenager Lamine Yamal from scoring a match-winning free-kick.
The reigning champions lost Enzo Fernandez to a brainless second yellow card just before extra time, with Lionel Scaloni’s lacklustre side continuing to stumble against Luis de la Fuente’s classy, ball-playing outfit.
Spain kept knocking at the door and substitute Torres eventually slammed home at the start of the second period of extra time.
Leandro Paredes looked to have gone out swinging amid reports he too was sent off.
Messi stood in tears in front of Argentina’s fans after collecting the runners-up medal, while President Trump managed to squeeze himself into another celebration shot.
The controversial half-time show, a first in a World Cup final, saw Madonna and Justin Bieber dazzle the stage in the company of Brazilian legends Ronaldo Nazario and Ronaldinho.
Shakira also returned to the World Cup stage to perform her hit Dai Dai, with Burna Boy. Also wedged in the segment was K-pop sensations BTS with their hit Dynamite.
But the show fell flat with some including England legend Wayne Rooney, who described it as "c***" while on punditry for the BBC.
The show resulted in the customary 15-minute half-time break lasting more than 27 minutes.
Hours earlier before the action began, there were somewhat bizarre scenes as Mission Impossible star Tom Cruise gave a passionate speech on the pitch.
Grammy-award winning singer Jennifer Hudson delivered a rendition of US national anthem The Star-Spangled Banner, wearing a white gown and matching blazer.
The blazer had a red, white and blue ribbon detail which tied the back of the jacket together.Williams appeared to perform the official Fifa anthem, Desire, alongside Pussycat Doll Nicole Scherzinger and Italian singer-songwriter Laura Pausini.
Robbie Williams wore a sparkling royal blue tracksuit and Scherzinger and Pausini wore blue gowns.
Tom Cruise gave a passionate speech before kick-off.
FIFA President Gianni Infantino, left, and President Donald J. Trump walk on the pitch.
In his speech, Cruise said: "Thirty days ago, nations began a journey. They crossed oceans. They crossed borders. They crossed cultures.
"And together, they showed us why this game belongs to the world. From every corner of the globe, we have witnessed greatness, and we have shared in moments of joy, moments of hope, moments we will all never forget.
"These stories now belong to each and every one of us, to every nation, to every player, to every supporter, to every volunteer, to every dream carried on the pitch."

Editor-in-Chief