Los Angeles FC won a wild ride of an MLS Cup final as substitute goalkeeper John McCarthy emerged as the hero, saving two penalties in the shoot-out after an astonishing 3-3 draw.
In front of their own fans on Saturday, LAFC took the lead through Kellyn Acosta's deflected free-kick but were pegged back just before the hour when Daniel Gazdag scored his 24th goal of the season.
Jesus David Murillo headed LAFC back into the lead in the 83rd minute, but Jack Elliott stung the hosts with another leveller two minutes later.
English centre-back Elliott looked to have won it when he put Philadelphia back in front deep into extra time, after LAFC goalkeeper Maxime Crepeau was sent off, but substitute Gareth Bale headed the hosts level in the eighth minute of stoppage time.
Then the drama really went up a notch, with McCarthy, a Philadelphia-born former Union goalkeeper, pulling off saves from Jose Martinez and Kai Wagner, after Gazdag also haplessly missed from the spot.
Ilie Sanchez tucked away the clinching penalty in a 3-0 shoot-out triumph, sparking wild celebrations of the team's first MLS Cup triumph, with McCarthy named MVP.
The opening goal in the 28th minute owed plenty to fortune, with Acosta's 22-yard strike flicking off the head of 19-year-old Union midfielder Jack McGlynn and finding the bottom-left corner.
This was the first time since 2003 an MLS Cup has featured the teams that came top in the West and the East. They each finished the regular season with 67 points, but LAFC took the Supporters' Shield due to having more wins than Philadelphia, and that earned them home advantage.
The game's first equaliser arrived in the 59th minute when what looked like a wildly ambitious 30-yard shot from Jose Martinez inadvertently turned into a throughball for Gazdag, who controlled the fizzing low ball well before firing past Crepeau.
Murillo looked to have headed a winner for Los Angeles with seven minutes remaining as he powered home Carlos Vela's inswinging corner from the right. However, a terrific equaliser from Elliott, a fierce header after a free-kick from Kai Wagner on the left, brought Philadelphia level in the 85th minute.
Bale entered the fray in the seventh minute of extra time, replacing Vela.
Philadelphia then looked to have been dealt an outrageous injustice when Cory Burke raced through on goal and was scythed down by Crepeau, who was initially only yellow-carded for a clear professional foul, but it was soon upgraded to red. Crepeau looked to be seriously injured and had to be carried off, and on came McCarthy, the unlikeliest of heroes.