EAST HARTFORD, Conn. -- Jurgen Klinsmann wouldn't have been pleased with a draw, even though that's all the United States needed to top its Gold Cup group.

The coach wanted to see his team push until the end.

Brek Shea scored late in the second half and Sean Johnson held a clean sheet as the United States handled its first real test of the CONCACAF competition by holding on for a 1-0 win over Costa Rica at Rentschler Field on Tuesday night.

The Americans, who had already clinched a spot in the quarterfinals following big wins over Belize and Cuba, finished in first place in Group C with nine points.

Klinsmann said prior to the game that the team's Gold Cup run would begin against Costa Rica, which trails only the Americans at the top of the World Cup qualifying Hexagonal standings, and both teams entered the night having won their first two Gold Cup matches.

“It was a game that we pushed towards the end to win it,” said Klinsmann. “We could have taken it easy, we could have said, ‘You know what? We are first anyway in the group. And a tie is fine.’ But a tie is not fine with us. So the team pushed and they grinded it out until the last minute.”

With a spot in the quarterfinals already secured following a 4-1 win over Cuba on Saturday, Klinsmann elected to go with Johnson in place of the Gold Cup squad's No. 1 goalkeeper Nick Rimando. The Chicago Fire man responded by keeping out nine shot attempts from the Central Americans.

Johnson's biggest moment led to the break that supplied the night's lone goal.

In the 82nd minute, Johnson made a remarkable fingertip save when Costa Rica's Alvaro Saborio fired a header off of a corner kick. The USA picked up the rebound and Landon Donovan guided the counterattack that led to Shea finding himself with a clear path to the net.

The Stoke City midfielder, who is coming off a tough stretch during his young career, had a nice first touch before sliding the ball past keeper Patrick Pemberton.

"Once I made the save, we just tried to get it out of there," Johnson said. "Then I saw it cleared and we're breaking the other way. It created and opportunity and we finished it."

It was Shea's first international goal in 20 appearances with the national team.

"It's good," Shea said. "First U.S. goal, only goal of the game, it wins the group. Really good."

Donovan, who is fighting for his spot on the USA's World Cup team, assisted the goal after receiving the breakout pass from Joe Corona. The veteran now has three assists in three games to go along with a pair of penalty-kick goals during the Gold Cup.

Although the United States walked away with the victory, it once appeared that the winning goal would come much sooner after a bizarre call from the referee.

Pemberton came out of the box and made a save with his hands, but the was only handed a yellow card despite stopping what could have been an empty-net goal. On the ensuing free kick by Jose Torres, Pemberton made a remarkable diving save and denied Donovan on the rebound.

But it all worked out in the end for Klinsmann's squad and it will now prepare for Sunday's quarterfinal match against El Salvador in Baltimore.