Canada won an Olympic bronze medal in the women's football with a 2-1 win over hosts Brazil in Sao Paulo.
Canada's Christine Sinclair hit the crossbar with a 25-yard free-kick before Deanne Rose scored from close range after Ashley Lawrence's fine run.
Rose, 17, crossed for Sinclair to score from eight yards, and hit the post herself before Beatriz pulled a goal back following a long throw.
Germany beat Sweden 2-1 in the gold medal match in Rio.
Victory gave Canada - beaten by England in the quarter-finals of the 2015 World Cup - their second successive Olympic bronze.
Brazil's men's side face Germany in the gold medal match on Saturday, in a repeat of the 2014 World Cup semi-final, which Germany won 7-1.
Subscribe to the BBC Sport newsletter to get our pick of news, features and video sent to your inbox.