MIAMI (AP) -- Canada tied Costa Rica 2-2 Friday night and clinched the top spot in its group at the CONCACAF Gold Cup.
The draw assured Canada seven points in Group A. The Canadians defeated Jamaica and El Salvador in their first two group games and advanced to the tournament quarterfinals July 18.
Costa Rica, which finished with a victory, loss and a draw, advanced to the knockout stage as group runner-up after Jamaica beat El Salvador 1-0 later Friday.
"It was a well-played match," Costa Rica coach Rodrigo Kenton said. "We got careless for a 10-minute period, but overall both teams played well.
"Congratulations to Canada."
Costa Rica sought a tie-breaking goal in the final 15 minutes of regulation.In the 75th, Celso Borges' took a shot deep in the penalty area that was deflected by Canadian defender Jaime Peter, who stood next to the left post.
Eight minutes later, Canada dodged another close call as Walter Centeno's header sailed above the crossbar.
"I thought the guys played their hearts out," Canada defender Andrew Hainault said. "We're happy with the result. To come out first in the group, nobody expected us to do this."
Costa Rica struck first on Andy Herron's goal in the 22nd minute. Greg Sutton sent a goal kick to the midfield area, where Costa Rica's Armando Alonso headed it to an open Herron on the right wing. Herron dribbled unmarked to Canada's penalty area and Sutton came off his line to cut Herron's angle. But Herron flicked a shot past Sutton.
Canada responded with two goals in the next 4 minutes. Patrice Bernier tied the match in the 23rd minute. Bernier received Josh Simpson's pass from the left wing and beat goalkeeper Ricardo Gonzalez with a shot from just outside the 6-yard box.
Marcel De Jong gave Canada a 2-1 lead with an unassisted goal in the 27th. De Jong found a loose ball, dribbled 5 yards and blasted a shot from 25 yards that landed inside the left post.
Centeno tied it with a swerving free kick above a wall of defenders 7 minutes later.