Barring a monumental collapse in the final CONCACAF qualifier, the U.S. men's national team will return to the World Cup in Qatar later this year after Christian Pulisic's hat trick fueled a 5-1 win against Panama in Orlando, Fla., on Sunday.

With the top three nations earning automatic qualification, the second-place Americans (25 points) play at fourth-place Costa Rica (22) on Wednesday. The only way the U.S. does not qualify is if the Americans lose by six or more goals.

The U.S. is looking to qualify after failing to do so for the 2018 World Cup.

READ | Chelsea thrashes Leicester 9-0 to go top of Women's Super League

The pounding of Panama assures the worst the Americans can do is finish fourth, forcing a one-game playoff for the World Cup berth against the Oceania region winner in June.

First-place Canada (28 points) used a 4-0 win against visiting Jamaica on Sunday to qualify for the first time since 1986.

Mexico also has 25 points but the U.S. is ahead on goal difference.

Pulisic gave the U.S. the lead on a penalty kick in the 17th minute after a video review ruled that Anibal Godoy fouled Walker Zimmerman.

The lead went to 2-0 in the 23rd when Paul Arriola sent a powerful header from the 6-yard box to the upper right corner from a cross by Antonee Robinson.

READ | Southgate hopes Kane will break England goalscoring record in World Cup

Four minutes later, it was Arriola's turn to be the set-up man. Shaq Moore got the ball to him and through a clutter of legs, Arriola made a pass to the center of the box where Jesus Ferreira slotted the ball for his third international goal.

Godoy committed another foul in the box in the fourth minute of first-half stoppage time and Pulisic converted again for the 4-0 lead.

He knifed through the defense in the 65th minute for 5-0 advantage for his first U.S. hat trick and 12th goal in his qualifying career. He has 21 goals in 47 games.

Godoy broke the shutout in the 86th minute, but it does not change what Costa Rica must overcome on Wednesday.