Julie Foudy breaks down the United States women's national soccer team's chances at winning the gold medal at the Rio Olympics. (1:07)

HOUSTON -- After scoring three goals against Trinidad and Tobago, Alex Morgan was relieved that the United States was assured a spot this summer in the Rio Olympics.

"We finally qualified," Morgan said. "We don't have to talk about qualifying anymore."

Morgan's hat trick, the third of her career, highlighted the United States' 5-0 victory over Trinidad and Tobago on Friday night in the semifinals of the CONCACAF Olympic qualifying tournament.

The World Cup champions, ranked No. 1 in the world, will seek their fourth straight Olympic gold medal and fifth overall.

Alex Morgan managed her third career three-goal game. Thomas B. Shea/USA TODAY Sports

There were two Olympic berths up for grabs in the North and Central America and Caribbean region. Canada secured the other spot in Brazil with a 3-1 semifinal victory over Costa Rica earlier Friday at BBVA Compass Stadium.

It is the third straight trip to the Olympics for the 11th-ranked Canadians, who will face the United States on Sunday in the tournament's final match.

The Americans went 3-0 with a 16-0 goal difference in the group stage of the eight-team qualification tournament. They capped the first round with a 10-0 rout of Puerto Rico led by a team record-tying five goals from Crystal Dunn, the last player cut from the roster that won the World Cup last summer in Canada.

The Americans have never lost a CONCACAF Olympic qualifier, going 17-0-1, and they've outscored opponents 96-4.

It is the first time Trinidad and Tobago has made the semifinals in qualifying.

"I think we took it to Trinidad and Tobago," Morgan said. "They're a really good first-half team but I think as the game wears on they get a little more unorganized. But I think we wreaked some havoc for them in the first half."

Coach Jill Ellis tinkered with the lineup a bit for the match, sitting Dunn and Ali Krieger, who had both logged a lot of minutes in the tournament.

Overall, Ellis is working with a younger roster than the one that won the World Cup last summer in Canada.

Several players, including Abby Wambach and Lauren Holiday, have retired. Amy Rodriguez and Sydney Leroux are expecting and won't be available for the Olympics. Megan Rapinoe is recovering from knee surgery.

The youngest on the team is 17-year-old Mallory Pugh, headed to UCLA next season. Pugh started and made an impact early with an assist on Tobin Heath's opening goal of the match in the 12th minute.

"I felt good," Pugh said afterward. "I think the whole atmosphere of the stadium and everything was just really cool, and I think that kind of translated into my game. And my teammates, too, just having Alex be so positive, I think that helped a lot, too."

It was Heath's first goal for the national team since she scored in the 5-2 World Cup final victory over Japan.

Morgan scored her first in the 30th minute off a header from another national team newcomer, 21-year-old Lindsey Horan. Horan skipped college to play professionally in France but will play this season for the NWSL's Portland Thorns.

Carli Lloyd, playing on the home field of her NWSL team, the Houston Dash, scored on a header in the 43rd minute for her 23rd goal in the team's last 18 games. Lloyd has 86 goals for her career.

Morgan added her second in the 71st minute and claimed the hat trick with a goal two minutes later.

U.S. goalkeeper Hope Solo saw very little action from T&T, which had no shots on goal.

"I was so mentally focused and prepared. I was hoping for a little bit more from Trinidad. I was hoping that once we went up by a couple of goals they would come at us, that they would press us, and I would be more involved in the game," Solo said.

Trinidad earned a spot in the semifinal by finishing second in its group with wins over Guyana and Guatemala. The last time the team faced the United States was in the CONCACAF qualifying tournament for the World Cup in 2014. The U.S. won 1-0.

Afterward, Trinidad and Tobago coach Richard Hood praised his team for the effort, but admitted they were simply outmatched by the World Cup champions.

"In the end we weren't able to cope with it as well as we'd liked," Hood said.