Canada's women's national soccer team secured a spot in the Rio Olympics by defeating Costa Rica 3-1 in the semifinals of the CONCACAF Olympic qualifying tournament on Friday in Houston. 

Canadian forward Christine Sinclair scored two goals in the match, bringing her international total to 161. Sinclair has already surpassed Mia Hamm on the scoring list to move into second place behind Abby Wambach with 184. 

Raquel Rodriguez scored on a penalty kick for Costa Rica to close the gap to 2-1, but Deanne Rose added the third marker for Canada to provide some breathing room in the 86th minute.

"It was a great moment for our country to be going to Rio, to be going back to the Olympics," said head coach John Herdman.

Canada will face the U.S. in the championship game on Sunday. The U.S. defeated Trinidad and Tobago 5-0 later Friday to secure the other Olympic berth up for grabs in the tournament. 

Canada improved to 4-0 in the tournament and has only conceded one goal. 

"Canada has some great players," said Costa Rica coach Amelia Valverde through an interpreter. "We left it all on the field. I'm proud of the girls this evening."

The Canadian breakthrough came in the 17th minute after a long cross from the right from fullback Josee Belanger eluded 16-year-old Rose but found Sinclair, who chested it down and scored on the half-volley with her right foot.

Sinclair went one better in the 52nd minute. With her back to goal just inside the penalty box, she pulled down a Costa Rican clearance with her right foot and popped into the air before swivelling and firing a left-footed looping shot into the goal.

"I'll have to see the replay. I don't know what happened. The ball bounced to me and I decided to juggle it a little bit and I turned and shot," Sinclair said. "I think it's one of those things you dream about and in a game like tonight I'll take it."

The 32-year-old left to applause in the 82nd minute after upping her goals total to three at the tournament and a record 18 in career CONCACAF Olympic qualifying.

"You look at tonight and it was a complete team performance, everyone did their part," Sinclair said. "You've got Deanne [Rose] at 16 and scoring goals in the biggest game of her career. Our job is not done here yet, but it's a huge honour to be going back to the Olympics. It's not easy."

With files from The Canadian Press and The Associated Press