CNN  — 

Gareth Bale’s dramatic, late goal helped Los Angeles Football Club win the Major League Soccer Cup for the first time in a thrilling, frantic final against Philadelphia Union at Banc of California Stadium in Los Angeles.

Jack Elliott looked to have won the game for Philadelphia when he scored in stoppage time of extra time, but substitute Bale’s header minutes later tied the game at 3-3 and forced a penalty shootout, which LAFC won 3-0.

“It’s always nice to score in finals, and I seem to have a knack for doing that,” Bale, who joined LAFC from Real Madrid earlier this year, told reporters after the game. “It’s big. It’s important for the club. It’s important for the fans.”

With Real Madrid, Bale scored three times in Champions League finals – including a stunning bicycle kick against Liverpool in 2018.

“The reason why I came here was to try and help the club win the MLS Cup,” the Wales international added.

“You can see how happy everybody is now – the fans, the city. It’s important for this club to go to the next level, and I think by winning this trophy, it shows that we are.”

Bale's stoppage time goal set up LAFC's first MLS Cup triumph.

LAFC opened the scoring in Saturday’s final through Kellyn Acosta’s deflected free-kick in the 28th minute.

Trailing 1-0 at the start of the second half, Dániel Gazdag of the Union scored the equalizer when he picked up José Martínez’s scuffed shot inside the box.

The game remained knotted up until the 83rd minute when Jesús Murillo’s goal gave Los Angeles the lead again. However, that lead wouldn’t last too long as Union’s Jack Elliott scored a header to force extra time.

In the 110th minute, LAFC goalkeeper Maxime Crépeau was shown a yellow card after a nasty foul on Philadelphia’s Cory Burke.

Both players were hurt by the foul and the card was changed to a red as Crépeau was carted off the field with an injury. Burke stayed in the game, while LAFC backup goalkeeper John McCarthy was brought on to finish the match.

Union’s Elliott stepped up again in stoppage time, scoring to give his side the lead with around five minutes left.

But just as the Union thought it had the championship secured, Bale produced the equalizer late in the final moments of stoppage time to force a penalty shootout.

McCarthy, who hails from Philadelphia, was the hero for Los Angeles as he saved two penalties in the shootout, while LAFC scored with three of its four attempts, including Ilie Sánchez’s championship-securing goal.

McCarthy celebrates LAFC's victory in Los Angeles.

That sent the home crowd went crazy as players and coaches ran onto the field to celebrate the victory.

McCarthy was named the 2022 MLS Cup Most Valuable Player after the match.