RIO DE JANEIRO -- It wasn't the way Kim Gaucher or the rest of her veteran teammates wanted their story to end.

Canada's women's basketball team missed out on a chance to play for an Olympic medal on Tuesday night after a 68-63 quarter-final loss to France in a game they controlled early and let slip away late.

"It sucks," said Gaucher. "It's going to suck for a long time."

The 32-year-old from Mission, B.C., led the way for Canada, which is ranked ninth in the world, with a game-high 15 points to go along with five rebounds, but it wasn't enough as the offence dried up after a lightning start.

"It's terribly disappointing," said head coach Lisa Thomaidis. "With every piece of me I believed we were going to be winning tonight and I think every single player that was on that floor wearing a red jersey believed that we were going to win."

Tuesday marked a changing of the guard for Canada as Gaucher, 32-year-old Lizanne Murphy of Beaconsfield, Que., and 34-year-old Shona Thorborn of Hamilton likely played their final game at the Olympics.

"It's heartbreaking," said Thomaidis. "They deserved to have a better ending than this."

Fourth-ranked France was paced by 14 points and a game-high 10 rebounds from Sandrine Gruda and will play powerhouse United States in one of Thursday's semifinals after the Americans thumped No. 16 Japan 110-64.

On the other side of the bracket, No. 14 Serbia upset No. 2 Australia 73-71 and will meet No. 3 Spain, which downed No. 10 Turkey 64-62, in the other semi.

Canada held a 25-16 lead after Tuesday's first quarter and stretched that lead to 13 before France went on a 12-0 run midway through the second to cut the deficit to 29-28.

"Foul trouble hurt us," said Gaucher. "We just gave away so many free points on the free throw line."

Canada's offence also dried up, accented by star guard Kia Nurse going just 3-for-17 from the floor against France's zone defence.

"We encountered some dry spells," said Thomaidis. "We had some poor shot selection. Shots that people normally make weren't falling."

Canada was solid defensively, frequently forcing France into shot-clock violations. But with a close game winding down, the French found the key buckets and the Canadians couldn't respond.

With Canada trailing by five late, Nirra Fields provided a ray of hope with a key bucket to cut France's lead to 64-61 with 25 seconds left. But on the ensuing inbound, she was called for an unsportsmanlike foul when she pushed a French player, giving France two uncontested free throws plus possession, essentially ending the game.

Despite the loss, the tournament in Brazil marked another step for Canada, which was making its second straight appearance at the Olympics after failing to qualify the Games in both 2004 and 2008.

"If nothing else I think we've proven we can play with the big girls now," said Thomaidis. "I thought we were ready to take that next step and knock off a big team when it was critical and to get ourselves into a semifinal."

After that early blitz and France's response, Canada got back on track late in the first half to take a 37-32 lead into the break.

But the French scored the first six points of the third quarter and the teams went toe to toe from there to sit tied 50-50 heading to the fourth.

Canada was coming off back-to-back losses to close out round-robin play, including a disappointing 73-60 setback to Spain on Sunday. The Canadians battled back from 47-35 to trail by just two heading to the fourth quarter of that one, but were left fuming at the buzzer after being outscored 24-13 over the game's final 10 minutes.

The Canadians, who beat the French in a couple of warm-up games before coming to Brazil, came in with a 3-4 record against Tuesday's opponent in overall tournament play, including a victory in the classification round at the 2014 world championships.

The evenly matched teams had almost identical stat lines ahead of tipoff, with each averaging 68 points and 18.4 assists through five games, while France had a slight 39.4 to 38.4 edge in rebounds per contest. Canada and France finished with identical 3-2 records in round-robin play. The Canadians wound up third in Group B, while the French were second in Group A thanks to a tiebreaker.

An unorthodox 10:15 p.m. local start time didn't keep fans away, with the lower bowl of the 16,000-seat Carioca Arena 1 in Rio's west end almost completely full for the game.

Canadian supporters packed the area behind the team's bench, while a smaller French contingent did the same one section over.

Canada began its momentum towards Rio at the London Olympics, where the team lost in the quarters to the U.S., and continued to gain traction during last summer's gold-medal performance at the Pan Am Games.

The roster from that memorable tournament remained unchanged in Brazil, but there will be new faces in the next quadrennial as the torch gets passed to the younger generation.

"The experience you gain from playing in an Olympic Games, you can't replicate that in any way, shape or form," said Thomaidis. "Just like the seven (players) who were in London, them coming back for this Olympic Games, the experience that they brought and the composure and just knowing that they belonged was huge for this team.

"It's going to have to be the same for the next group that's going to carry us forward to 2020. We learned and we grew and improved from our showing from 2012 and the same is going to have to happen from this experience."