MIAMI -- Chants of "USA! USA! USA!" rang through Dolphin Stadium as Team USA players piled on David Wright near second base.

The calendar may say March, but the celebration on Tuesday night resembled October.

Wright blooped a dramatic two-run single, capping a three-run ninth inning, that lifted Team USA to a 6-5 win over Puerto Rico in an elimination game at the World Baseball Classic.

For Wright, the Mets All-Star third baseman, it was the ideal finish to a 3-for-4 night in a game in which Team USA struggled to find the big hit.

With the victory, Team USA is guaranteed a place in the semifinals in Los Angeles. It will join Venezuela from Pool 2 in making the trip out West. Team USA wraps up its six-game set at Dolphin Stadium on Wednesday at 7 p.m. ET against Venezuela in a game that will decide seeding.

"The celebration was pretty wild," Wright said. "I never thought that we'd be dogpiling in March, but it was pretty special and something I'll always remember."

After squandering chances all night, Team USA responded in its final at-bat.

Shane Victorino opened the inning with a single off his Phillies teammate, J.C. Romero. Brian Roberts singled, and the drama began to build. Derek Jeter lined a long fly to right, and Victorino tagged and moved to third. Roberts swiped second, and Jimmy Rollins walked in an eight-pitch at-bat, loading the bases and bringing the 13,224 to their feet.

Fernando Cabrera relieved Romero to face Kevin Youkilis, who homered in the third inning. On five pitches, the Red Sox All-Star walked, closing the gap to one run.

"To me, the fan support was the best it's been the whole entire tournament," Youkilis said. "I think that it was unbelievable, the feeling of the 'USA!' chants, and it just actually felt for once that we were the home team, and that was a great sign."

The park had its share of Puerto Rican fans, and everyone on the night was treated to a high-quality game.

For Team USA, Tuesday was sweet revenge. On Saturday night, Puerto Rico swarmed Team USA, 11-1, ending the game by the 10-run rule in seven innings. The crowd on hand Tuesday was treated to a more competitive and compelling contest.

"Well, I really wanted to play Puerto Rico," conceded Team USA manager Davey Johnson. "I didn't want to say it in the press conference the other day, but both clubs had beat us. But we hadn't beaten Puerto Rico."

Team USA split two games with Venezuela in the first round in Toronto. And it was embarrassed on Saturday by a strong Puerto Rican team that now is going home after Wright slapped his opposite-field single on a 2-1 pitch to become the hero.

Puerto Rico built its lead on Carlos Delgado's two-run homer and two RBIs and a homer from Alex Rios. Rios scored an insurance run in the ninth inning, giving his country a two-run cushion.

"If you are a baseball fan, you had to enjoy this game," Jeter said. "Regardless of what country you are from, which I'm sure if you are from Puerto Rico you were a little bit disappointed, but it was still an exciting game to watch."

Walks allowed hurt Team USA's pitching staff on Tuesday. Of the seven combined walks issued, Puerto Rico converted three of them for runs. Still, Team USA was able to prevail.

After overcoming a two-run deficit, Puerto Rico reclaimed a one-run lead in the sixth inning. Capitalizing on a leadoff walk issued by reliever Heath Bell to Ivan Rodriguez, Rios slapped an RBI single to center.

Team USA missed on several chances, stranding runners on second and third in the third inning, a runner on second in the fifth and runners at the corners in the seventh.

Down by a run in the seventh, Victorino singled and went to second on Roberts' sacrifice bunt. Jeter walked, and Rollins lifted a fly ball to right field. On the play, Victorino advanced to third when right fielder Rios' throw deflected off him while he was standing on second base.

Puerto Rico protested briefly, claiming Victorino obstructed the ball. Their argument was denied. Reliever Saul Rivera entered and retired Youkilis on a groundout to shortstop.

Again in the eighth inning, the United States left a runner at second. Wright singled to open the inning. But with two outs, Romero struck out Brian McCann, stranding pinch-runner Curtis Granderson on second. Granderson ran for Adam Dunn, who reached on a fielder's choice.

In the third inning, Youkilis gave Team USA a 3-1 advantage when he launched a shot to left for his third homer of the Classic.

"When you have the fans and the adrenaline rush from the fans getting into the game, it helps out a lot," Youkilis said. "That's a big reason why we won today, I think."