Cristiano Ronaldo struck at the death to earn Manchester United a valuable 2-1 win over Villarreal in the Champions League group stage.
The Yellow Submarine had several chances to put the game beyond doubt after taking a second-half lead, but were made to rue the day by a resilient United.
Former Bournemouth winger Arnaut Danjuma had two glorious opportunities to open the scoring for Villarreal in the first 10 minutes, but was denied by David De Gea on both occasions.
The Dutchman continued to cause trouble down United's right flank, with his driven cross being met by the head of Paco Alcacer, and De Gea had to react quickly to tip it over.
A lapse in concentration from Raphael Varane let Alcacer slip in behind, but the Spaniard couldn't keep his shot on target.
The closest United came to scoring in the first half was when ex-Liverpool man Alberto Moreno nearly poked the ball into his own net, but was fortunate to see it roll just beyond Geronimo Rulli's goal.
Villarreal finally took a deserved lead shortly after the break, with Alcacer poking home Danjuma's low cross after sneaking between Victor Lindelof and Alex Telles.
Telles made amends by firing in the equaliser on the hour mark, volleying home a clever free-kick from Bruno Fernandes. Jadon Sancho had a great chance to put United in front almost immediately, but slipped at the crucial moment when pulling the trigger.
Substitute Edinson Cavani then spurred the game's next big chance after meeting Mason Greenwood's cross, though his headed effort went narrowly wide.
United were let off the hook again with five minutes remaining as Boulaye Dia failed to scramble in a goal from inside the six-yard box, with Telles providing a crucial block on the line.
The hosts had one final chance to earn all three points deep into stoppage time when the ball ricocheted to Ronaldo at close range and he slotted it into the roof of the net, sending Old Trafford into delirium.
Here are your player ratings for both teams from Manchester...
Man Utd player ratings
1. Goalkeeper & defenders
David de Gea (GK) - 7/10 - The only reason United managed to get into half-time still in the game. His own personal renaissance goes on.
Diogo Dalot (RB) - 2/10 - Nightmare performance. Danjuma chewed him up and spat him out.
Raphael Varane (CB) - 3/10 - Often caught high up the pitch and his general lapses in concentration nearly cost United further.
Victor Lindelof (CB) - 4/10 - Just generally weak and looked afraid of Villarreal, though without the basic errors.
Alex Telles (LB) - 6/10 - United's best defender, which isn't saying much - just means at no point was he embarrassed. Cracking goal, too.
Scott McTominay (CM) - 5/10 - Tasked with holding down the fort but was routinely overrun.
Paul Pogba (CM) - 4/10 - Help for McTominay was non-existent and he didn't even make up for it with creative or attacking brilliance.
Bruno Fernandes (AM) - 6/10 - Clever assist and looked like United's only hope of finding a moment of genius. Hardly a vintage performance, mind.
Mason Greenwood (RW) - 4/10 - Unusually sluggish performance from the teenager. Didn't threaten anywhere near as much as he would have liked.
Cristiano Ronaldo (CF) - 6/10 - Couldn't get into the game and was awful on the ball even when he was picked out. But you just can't ever write him off.
Jadon Sancho (LW) - 4/10 - Hooked for Edinson Cavani after spending 75 minutes of failing to get the better of *checks notes* Juan Foyth.
Edinson Cavani (CF) - 5/10
Nemanja Matic (CM) - 5/10
Jesse Lingard (RW) - N/A
Fred (LB) - N/A
Villarreal player ratings
5. Goalkeeper & defenders
Geronimo Rulli (GK) - 6/10 - Far more assured here than in the Europa League final.
Juan Foyth (RB) - 6/10 - Coped well with Sancho but strangely offered little going forward. Doesn't sound like him at all.
Raul Albiol (CB) - 6/10 - Booked for a cynical foul on former teammate Ronaldo, but otherwise a decent game.
Pau Torres (CB) - 7/10 - Didn't have a great summer individually with Spain but put in a performance which showed exactly why Man Utd were chasing him. So smooth in possession and actually looked commanding at the back.
Alberto Moreno (LB) - 5/10 - Started well, then got given the runaround a bit by Greenwood even without the Englishman making any chances.
Etienne Capoue (DM) - 6/10 - Did the very basics of a defensive midfielder. United's cohort should take note.
Dani Parejo (CM) - 6/10 - Tidy as always without ever looking amazing.
Manu Trigueros (CM) - 6/10 - Provided some neat line-breaking passes on the counter.
Yeremi Pino (RW) - 6/10 - Much like Parejo, looked very slick but didn't cause too many problems.
Paco Alcacer (CF) - 8/10 - Short and slow and yet he still caused United headaches for around an hour.
Arnaut Danjuma (LW) - 8/10 - Absolute menace, deserving of his assist on his return to these shores.
Boulaye Dia (CF) - 6/10
Pervis Estupinan (LB) - 5/10
Moi Gomez (RM) - 6/10
Ruben Pena (RB) - 4/10
Aissa Mandi (CB) - 5/10
Source : 90min