TORONTO -- Dwayne De Rosario scored on a quick free kick in the 77th minute to rescue Canadian World Cup qualifying hopes with a 1-0 win over Panama on Friday.

Panama fell asleep at the switch after a free kick was awarded on the right flank outside the penalty area. Atiba Hutchinson immediately floated the ball in and an unmarked De Rosario swooped in to tap in his record 20th goal for Canada.

"Great vision by Atiba Hutchinson to catch the defence sleeping, " said De Rosario. "Really all I had to do was just focus on the ball and put it in the back of the net.

"Happy to get that goal in front of our fans and in front of a great crowd tonight."

Up until that point, it seemed like Canada might be squandering two more precious points at home in what seemed a must-win evening.

Picking up points at home is crucial in qualifying. Poor performances on Canadian soil have cost the national team in recent qualifying campaigns -- last time out at this stage, Canada managed just two draws and a loss at home and failed to advance.

The Canadians, who have now recorded five straight shutouts, had pressed the action but failed to turn that advantage into goals. A canny Panama side was content to soak up the Canadian attack in the first half before showing more on attack in a more even second half.

A tough rematch in Panama City awaits Tuesday.

Midway through this qualifying round, Canada (2-0-1) has seven points while Panama (2-1-0) has six.

Honduras (1-1-1) climbed up the group standings with a 3-0 win in Cuba earlier Friday, upping its points total to four. Cuba, winless and pointless at 0-3-0, has not scored in 573 minutes.

The Hondurans, ranked No. 72, will likely add three more points Tuesday when they host the 147th-ranked Cubans.

Only the top two teams from the group will advance to the final round of qualifying in the region.

After the game in Panama, the Canadians will host Cuba on Oct. 12 in Toronto before finishing the round some four days later in Honduras.

A loud and proud crowd of 17,586 roared Canada on in a game played with plenty of emotion from both sides.

"It's good to score, good to get the three points," said Canada's head coach Stephen Hart. "Fantastic atmosphere. I thought the first half was one of the best first halfs I've seen from Canada."

Canada pressed throughout the first half but was denied, despite two good headed chances by captain Kevin McKenna in the first half. As the game wore, the hard-nosed visitors looked to cloud matters by antagonizing the Canadians or just whacking them.

Members of the Canadian bench were up in arms during stoppage time as a melee almost broke out.

The top two teams in Canada's group will advance to the final round of qualifying in CONCACAF, which covers North and Central America and the Caribbean.

Six teams will then contest three places from the region at the 2014 World Cup in Brazil, with a fourth CONCACAF team facing a squad from Oceania to see who joins them.

Panama is ranked 50th in the world, some 23 places above Canada, and has been enjoying an upswing in recent years.

Los Canaleros (Canal Men), whose outfield players opted to stay in the dressing room rather than warm up prior to the match, were welcomed by a small but enthusiastic group of supporters in the north stand. "Our Time to Shine" read the giant Canadian banner at the other end of the stadium.

The Panamanian fans were drowned out during the game.

Hundreds of fans came early to meet members of the Canadian women's team, bronze medallists at the recent London Olympics. The Canadian women signed autographs prior to the game and drew chants of Canada as all 14, including captain Christine Sinclair, were introduced prior to kickoff.

Olivier Occean led the Canadian attack, flanked by Simeon Jackson and De Rosario with Will Johnson and Hutchinson looking to pull the strings from midfield.

Panama looked to stay compact and counter-attack through strikers Blas Perez and Luis Tejada when possible. The visitors stayed composed, putting plenty of men behind the ball. And when cracks showed in the defence, someone was quick to move in and nullify the threat.

Canada looked lively early and McKenna's header was wide off the first corner of the game in the seventh minute.

Costa Rican referee Jeffrey Solis had the crowd howling and Johnson shaking his head midway through the first half after some fancy footwork by Luis Henrique earned Panama another free kick.

Veteran goalie Jaime Penedo came to the rescue in the 33rd minute, parrying a De Rosario shot, and then punching away the ensuing Canadian corner.

McKenna, a central defender who played striker earlier in his career with the national team, hit the post with a header off a 36th-minute free kick.

The scoreboard remained unchanged but tempers were rising. De Rosario and burly Panamanian captain Felipe Baloy jawed at each other late in the first half after Alberto Quintero was fouled and stretchered off, only to recover seconds later.

The visitors failed to put a shot on target in the first 45 minutes.

Panama began to show some offence in the second half. A shot early in the half had Lars Hirschfeld diving but the ball flew wide and a corner in the 52nd minute looked dangerous as the ball ricocheted around the penalty area before it was booted away.

Canada responded with hard shots by De Rosario (saved) and Occean (wide).

A long-range chip tested Hirschfeld in the 60th minute as the Canadian goalie was berating McKenna for a short backpass that led to a frantic clearance.

At times the individual skill of Panama players left Canadians frozen on the pitch.

Canada has only made it to the World Cup once, in 1986, and has stalled out in the penultimate round of regional qualifying for the last three World Cups. The Canadian men made it to the final round in CONCACAF qualifying for the 1998 tournament, but finished last in the group with a 1-6-3 record.

The Canadians came into Friday's game confident and with a healthy squad (with the exception of Josh Simpson). Hart's squad had posted shutouts in its previous four matches and nine of its last 10-- going 5-1-4 in the process -- although five of those clean sheets came against lesser CONCACAF competition in the previous round of qualifying.

Panama has also been stingy. Penedo came into the game having blanked the opposition in the two previous games -- and was beaten just twice in the previous round.