Jonathan Osorio's 75th-minute goal rescued Toronto FC on Saturday, ending a three-goal Los Angeles Galaxy comeback and helping the MLS champions to a desperately needed 5-3 win.

Jay Chapman added an insurance goal in stoppage time with a low shot to the corner of the goal.

A tie might have sounded the death knell to Toronto's slim playoff hopes. But Osorio, as he has done all season, stepped up when needed and headed home a Marky Delgado cross for his 10th of the season.

But coupled with Montreal's 4-1 win over Philadelphia, Toronto (8-14-6) remains nine points out of the playoff picture with six games remaining.

Zlatan Ibrahimovic scored career goal No. 500 to trigger a Galaxy rally that silenced the BMO Field crowd of 30,799.

The 36-year-old Ibrahimovic has a flair for the dramatic and he did not disappoint in notching his 43rd-minute milestone goal.

With the Galaxy trailing 3-0, Jonathan dos Santos chipped the ball into the box. The six-foot-five Ibrahimovic twirled to get an angle at the ball between two defenders, flicking his right leg up high to deflect it past goalkeeper Alex Bono for his 17th of the season.

The stylish Swede joins Barcelona's Lionel Messi and Juventus' Cristiano Ronaldo as the only active players with 500 goals for club and country.

Given the two teams had conceded 106 goals between them this season prior to Saturday, there was no shortage of offence on show. It was a wide-open affair that could have produced 10-plus goals.

Victor Vazquez, Jozy Altidore and Sebastian Giovinco also scored for Toronto, which led 2-0 after 22 minutes and 3-0 after 36.

Ola Kamara and Rolf Feltscher also scored for Los Angeles (10-11-8), which beat Bono twice in five minutes early in the second half to tie it at 3-3.

The game saw 10 yellow cards issued, six to the Galaxy and four to Toronto.

Toronto went ahead quickly with Vazquez heading in a fine Gregory van der Wiel cross in the fifth minute. Altidore doubled the advantage in the 16th minute with a low shot after a nice passing buildup.

Kamara came close for L.A. in the 18th minute but his header, from a Jonathan Dos Santos cross, hit the post. Three minutes later, Bono stopped Feltscher in close off a corner.

Vazquez tried to chip David Bingham in the 22nd minute but goalkeeper got a hand to it.

Giovinco made it 3-0 in the 36th minute, beating Bingham after Toronto outran a sluggish Galaxy defence on the counter-attack.

L.A. had a chance to cut the lead to 3-2 in the 50th minute when Ibrahimovic headed the ball over to Kamara but his shot went high. Kamara made no mistake four minutes later, heading in a dos Santos free kick with Toronto's defenders offering minimal resistance.

Altidore looked to make it 4-2 in the 57th minute, twisting and turning the Galaxy defence only to shoot the ball just wide. The Toronto defence was caught at the other end with Feltscher ghosting in to head home an Ashley Cole cross to tie it at 3-3 in the 58th minute.

Both teams desperately needed a win to keep their playoff hopes alive. Going into the match, the analytical website FiveThirtyEight had the Galaxy's chances of making the post-season at 11 per cent while Toronto's number was four per cent.

TFC entered the day in ninth place in the East, nine points out of the playoff picture with seven games remaining. It needed to win out and hope for the best.

The signs were not encouraging. Toronto was coming off a 4-2 home loss to Los Angeles FC, had won just once in its previous six games (1-3-2) and collected 13 of an available 42 points over the last 14 games (3-7-4). Since June 8, Toronto had beaten just Chicago (twice) and Montreal in league play.

TFC must now turn its attention to the inaugural Campeones Cup, which pits Toronto as reigning MLS title-holder against Mexican champion Tigers UANL, on Wednesday at BMO Field. Toronto returns to league action at the New York Red Bulls next Saturday.

The Galaxy arrived winless in six games (0-3-3), a stretch that saw them outscored 18-8 and precipitated the departure of head coach Sigi Schmid. Interim coach Dominic Kinnear was in charge Saturday.

L.A. arrived in eighth spot in the west, three points out a playoff picture. The Galaxy had conceded eight goals in their two previous road games, giving up six goals in Salt Lake and five in Seattle.

Toronto was missing defenders Drew Moor, Chris Mavinga and Brazil's Auro. The last two have been making their way back from injury, but the absence of Moor (minor calf strain) was a surprise.

Bradley, normally a holding midfielder, lined up in the middle of a Toronto back three. But Toronto reverted to a back four with Bradley in the midfield after the game was tied at 3-3.

The Galaxy were without injured midfielders Giovani dos Santos (Jonathan's brother) and Sebastian Lletget.

Los Angeles came into the game with a 6-4-6 series lead over Toronto but was only 1-2-4 in Toronto.