MONTREAL — Didier Drogba has a flair for the dramatic.

The Ivorian scored on a free kick in stoppage time — virtually the last kick of the game — to lift the Montreal Impact over the LA Galaxy 3-2 on Saturday in Major League Soccer action.

Drogba scored his fifth goal of the year from 35 yards out in the dying seconds of injury time. Galaxy goalkeeper Brian Rowe should have made the easy save, but missed his punch, and the ball spun into the back of the net.

"I just wanted to hit the target, and that's what I did," said Drogba, who has now scored in four consecutive matches. "I was lucky enough that the goalkeeper didn't hold it.

"These things happen. That's football. That's the game."

The goal sent the sellout crowd of 20,801 at Saputo Stadium into a frenzy and snapped Montreal's six-game winless run in the process.

The three points also propelled the Impact (5-4-4) into third place in the Eastern Conference.

Rowe said the way the match ended was "difficult to swallow."

"I knew his capabilities for free kicks," said the Galaxy 'keeper of Drogba. "I knew he was just going to try to make it knuckle, make it dance. I just took my eye off it for a second.

"It's definitely a frustrating one. The guys put in a good effort and they deserved a better result."

The win was Montreal's first against the Galaxy in franchise history (1-1-3) and first at home in its last four games.

"We really needed that win," said Montreal head coach Mauro Biello. "What a big goal by Didier. It's great for the morale and the confidence. My dressing room was very vibrant after the game.

"I don't think I've heard Saputo Stadium that loud in all the years."

With the home side trailing 1-0 early on, Ignacio Piatti tied the game on a counter-attack with his team-leading eighth goal in the 26th minute.

The play was started when Drogba fed the speedy Dominic Oduro down the wing with a splendid through ball. Oduro ran at the lone Galaxy defender Jelle Van Damme, cut to his right, and passed to a wide-open Piatti. The Argentine beat Rowe with a low shot into the corner of the net.

The assist was Oduro's fifth of the year — tied for second best in MLS.

After several minutes of intense pressure from the home side in the second half, Montreal took the lead in the 56th when Lucas Ontivero curled a right-footed shot in the top corner of the net, well out of Rowe's reach.

Giovani dos Santos and Mike Magee had goals for the Galaxy (5-2-5), who lost for the first time in 10 matches.

A misunderstanding between goalkeeper Evan Bush and defender Maxim Tissot led to the Galaxy's first goal in the eighth minute.

After Magee knocked the ball in the air in the six-yard box, Tissot chose not to clear with a header, thinking Bush would punch the ball away. Instead, the ball landed on Tissot's back and rolled right to dos Santos, who made no mistake from close range.

"My expectation was that he was going to move," said Bush. "His expectation is that he should just duck, and that I would come through him. Both of us are probably to blame.

"It almost cost us a couple of points tonight, but fortunately it didn't."

After Ontivero made it 2-1, Magee scored the equalizer in the 58th minute. After controlling a cross by Steven Gerrard in the box, Magee turned and shot past a helpless Bush.

The Galaxy's Robbie Keane (Republic of Ireland) and Gyasi Zardes (United States) were away on international duty. Laurent Ciman (Belgium), Ambroise Oyongo (Cameroon) and Johan Venegas (Costa Rica) were absent for Montreal.

Notes: Midfielder Marco Donadel exited the match in the first half with an ankle injury. … Former Impact player Marco Di Vaio was in attendance, as was Montreal Canadiens forward Tomas Plekanec.