SAO PAULO (AP) — Christine Sinclair had struggled recently with the death of her father. So when she was given her bronze medal at the Olympics on Friday, the Canadian star immediately thought of him.

"I love you dad," she said.

Sinclair scored in her 250th international match and Canada returned to the Olympic podium with a 2-1 victory over host Brazil for the women's soccer bronze medal.

It was the second straight bronze for the Canadians, who medaled for the first time at the London Games four years ago.

Seventeen-year-old Deanne Rose scored in the 25th minute for Canada, becoming the youngest woman to score in the Olympics.

Sinclair added her 11th career Olympic goal in the 52nd. She now ranks second among all-time Olympic scorers, behind Brazil's Cristiane, who has 14.

"It is a hard year for me, facing sad things. But I was not going to leave this tournament without a medal," said Sinclair, who lost her father a couple of months ago.

Brazil avoided the shutout with a left-footed strike by Beatriz in the 79th minute.

Afterward, Sinclair sobbed as she hugged her teammates on the field at Corinthians Arena, one of the many venues hosting Olympic soccer matches across Brazil.

"Everything that has happened is pretty surreal, the whole experience. It was just a great, a fantastic experience. The girls are very clear in what they want to do," Canada coach John Herdman said. "For me, it is a pleasure working with them."

The loss caps a frustrating end to the Olympics for the hosts and their star, five-time FIFA Player of the Year Marta.

Marta has scored 104 goals in 107 international appearances, has the most World Cup goals with 15 and also has 10 Olympic goals, tying her for third on the career list with former U.S. forward Abby Wambach.

But Brazil was ousted from a shot at the gold-medal match 4-3 on penalties after a scoreless draw against Sweden on Tuesday. The major international title that has eluded Marta would not come on home soil at this year's Olympics.

Canada was denied a shot for the gold by Germany, which won 2-0 in the semifinals.

Sweden and Germany were playing for gold at the Maracana Stadium in Rio de Janeiro on Friday.

Sinclair scored three goals in the Olympic tournament, bringing her career goal total to 165. That's second on the all-time list behind Wambach, who finished her career with 184 before retiring last December.

Sinclair's caps are the most for any Canadian national team player.

While women's soccer is not very popular in Brazil, Marta impressed fans with her intelligent play and stellar footwork. When the men's side was struggling early in the tournament, some fans crossed out Neymar's name on their No. 10 jerseys and wrote in "Marta."

Brazil's men recovered from their shaky start and will face Germany at the Maracana on Saturday in the other soccer final, with the hosts guaranteed at least silver.

"We did not get on the podium," Marta said, "but our best reward is the recognition of the people, being applauded everywhere we go."