Bruno Fernandes scored a penalty with the last kick of an astonishing game as Manchester United stole a 3-2 win over a Brighton and Hove Albion side who struck the woodwork five times.
The Portuguese kept his cool in the 100th minute to settle matters at the end of a dramatic encounter at the Amex Stadium in which United rode their luck to the extreme.
Brighton, showing no signs of fatigue despite facing a fifth game in 13 days, hit both posts and the crossbar in the first half before breaking the deadlock via Neal Maupay's nerveless Panenka penalty after Fernandes fouled Tariq Lamptey.
United – needing a response to their limp opening-game loss to Crystal Palace – levelled within 187 seconds, though, Lewis Dunk unfortunate to divert past Mat Ryan from close range after Fernandes' set-piece caused problems.
Referee Chris Kavanagh chalked off a penalty he had awarded early in the second half after reviewing the incident himself, allowing Paul Pogba to breathe a sigh of relief after Aaron Connolly took a tumble.
Ole Gunnar Solskjaer's men made full use of the reprieve as Marcus Rashford, having just seen a goal disallowed, brilliantly danced his way into the box and fired home via a deflection off Dunk.
Graham Potter was cursing his luck when Solly March and Leandro Trossard hit the post and bar respectively, before jumping for joy when the former headed in a stoppage-time equaliser.
But the drama was not over and Maupay handled Harry Maguire's header, which was cleared off the line by March. The final whistle had gone but a VAR check resulted in a spot-kick from which Fernandes wrapped up the points in a game that will live long in the memory.
What does it mean? United paper over the cracks
This performance will persuade nobody that United are going to be a genuine threat this season – the visitors were clearly second best.
Brighton hit the woodwork five times, which is a record in a Premier League match since Opta began collecting such data in 2003.
On another day, this could so easily have been another chastening loss for United.
Trossard emulates Ronaldo...
Following in the footsteps of Cristiano Ronaldo is generally considered a good thing, but for Trossard it will be a source of huge frustration.
He became the first player since Ronaldo to hit the woodwork three times in a Premier League match, the Portugal star having done so for United against Newcastle United in 2006.
Adam Webster also saw a header tipped onto the bar by David de Gea on a frustrating day for the Seagulls.
Fernandes a cut above
Along with Rashford, Fernandes is one of the few United players who will emerge from this game with credit.
As well as getting the winner, he provided an assist and has now had 17 goals involvements in 16 Premier League appearances.
It will be a case of deja vu for these two sides, who meet again in the EFL Cup on Wednesday.