The Canadian women's soccer team finished its preparations for the London Olympics on Tuesday, losing 2-1 to Brazil in the Match World Women's Cup.
Canadian star Christine Sinclair scored a game-tying goal in the final moments of stoppage time, but just seconds after the game restarted Brazilian substitute Grazielle scored the winner.
Formiga also scored for Brazil.
Canada finished the tournament with a 1-1 record after beating New Zealand 2-0 on Saturday.
Brazil controlled the game for the bulk of the first half and was ultimately rewarded in the 44th minute. Formiga found Marta's corner in the 18-yard box and scored with a right-footed volley.
Canada started to create chances in the second half, but it didn't come to fruition until stoppage time when Sinclair capitalized on a mistake by Brazilian goalkeeper Andreia to equalize.
Canada couldn't hold onto the tie, which would have forced penalty kicks to determine a tournament winner. Marta led an attack from the left-hand side, and her pinpoint cross was poked in by Grazielle.
Canada midfielder Diana Matheson was named player of the tournament despite the loss.
Sinclair set a national record with her 17th goal of the year. The 29-year-old native of Burnaby, B.C., has 137 career goals, one behind Abby Wambach of the United States for the lead among active players.
Canada will open the Olympic tournament against Japan in Coventry on July 25.