The United States men's national team is moving on at the Gold Cup after beating Nicaragua 3-0 on Saturday night to win Group B. Just when it looked like the U.S. wouldn't get the three-goal win it needed to win the group, a late header goal from Matt Miazga enabled the Americans to leap Panama atop the group and thus avoid Costa Rica in the quarterfinals. 

It was a better performance than against Martinique, but it still wasn't much to look at for the most part against an overmatched opponent. Dom Dwyer and Joe Corona both missed penalty kicks in the second half, but a Corona goal in the 36th minute, coming off a deflection, was enough.

With the U.S. looking like the more threatening squad, Kelyn Rowe added the United States' second just before the hour mark:

But the match was set for a frantic finish as the U.S. knew how important it would be to win the group and get a better matchup in the quarterfinals. And a late set piece after Juan Agudelo was fouled gave the hosts the chance it needed to complete its objective. Graham Zusi delivered a brilliant ball to the far post off the set piece, with Miazga diving to head it home:

It wasn't the best of performances but it was certainly the team's best in the Cup so far, and as a result the U.S. will now likely play El Salvador, Jamaica or Honduras in the quarters on Wednesday. The opponent will be known Sunday after Group C is decided.

Live blog

(CBS Sports app users, click here to view the live blog)

For news, stories, results and more, follow us:

- @CBSSportsSoccer - @RGonzalezCBS - Facebook