Los Angeles FC finally beat rivals LA Galaxy 5-3 in a wild Western Conference semi-final that could have been Zlatan Ibrahimovic's last game in MLS.

Ibrahimovic is out of contract at the end of the season and the former AC Milan, Inter and Juventus striker has been linked with a January return to Serie A via Napoli, Bologna and the Nerazzurri.

Amid the uncertainty over his future, Ibrahimovic was unable to prolong the Galaxy's season as LAFC prevailed in an eight-goal thriller to advance to the Conference final on Thursday.

Supporters' Shield winners LAFC had never beaten the Galaxy in five previous fixtures but they quickly moved to end that drought thanks to Carlos Vela's first-half brace at Banc of California Stadium.

LAFC captain Vela broke the deadlock in the El Trafico derby, cutting inside onto his right foot and firing a low shot past Galaxy goalkeeper David Bingham in the 16th minute.

Vela doubled the lead in the 40th minute, when he was on hand to side-foot into an empty net after Brian Rodriguez's selfless pass, before Ibrahimovic teed up Cristian Pavon a minute later.

Ibrahimovic put the visiting Galaxy on level terms 10 minutes into the second half but their joy quickly turned to despair as quick-fire goals from Diego Rossi and Adama Diomande restored LAFC's two-goal advantage with 22 minutes remaining.

Rolf Feltscher set up a frenetic finale by reducing the deficit to 4-3 in the 77th minute, however Diomande's stunning solo effort ended the Galaxy's hopes within three minutes.

Bob Bradley's LAFC will now meet Seattle Sounders for a spot in the MLS Cup final.

In the day's other match, defending champions Atlanta United accounted for Philadelphia Union 2-0.

Julian Gressel and Josef Martinez saw Frank de Boer's Atlanta advance and earn an Eastern Conference final date with Toronto.