Clint Dempsey finishes off his second goal Tuesday in Kansas City as the U.S. advances to the final round of regional qualifying while eliminating Guatemala. (Reed Hoffmann/Associated Press)

The U.S. national soccer team had encountered unanticipated trouble at every turn in the semifinal round of qualifying for the 2014 World Cup. So it seemed almost fitting that, five minutes into Tuesday’s critical finale against Guatemala, the Americans conceded a confounding goal.

They had survived prior missteps, knowing they could compensate in future matches, but a loss at sold-out Livestrong Sporting Park would threaten to eliminate them at an absurdly early stage.

Pressed for a response, the United States scored three times before halftime, two by Clint Dempsey, and outlasted the Chapines, 3-1, to advance to the final round of regional qualifying.

Carlos Bocanegra also scored for the Americans, who won Group A with a 4-1-1 record and 13 points but weren’t in a comfortable position to advance until the last half of the last game.

“No matter what, we got out of the round,” said Dempsey, who scored in the 18th and 36th minutes after Bocanegra’s equalizer in the 10th. “Whether we play great or don’t play great, we got the job done. Next round, we need to be better.”

In the other group match, Jamaica (3-2-1, 10 points) defeated winless Antigua & Barbuda, 4-1, to best Guatemala (3-2-1, 10) in the first tiebreaker (overall goal difference) and accompany the United States to the next stage.

Mexico, Panama, Honduras and Costa Rica also advanced to the six-nation final round, which will begin Feb. 6.

Each team will play 10 matches over seven months to determine three automatic berths in Brazil in two years. The fourth-place finisher will enter a two-leg playoff against the Oceania champion in November 2013.

For the Americans, who have participated in the past six World Cups, the semifinal stage figured to serve as an annoyance rather than a hindrance. But from the start of competition, when they labored in Tampa to put away Antigua & Barbuda, a microscopic Caribbean country, the Americans struggled to separate themselves from lightweight foes.

“We at least went out in style,” goalkeeper Tim Howard said.

Trouble, however, brewed almost right away against Guatemala. Carlos Ruiz collected Jose Contreras’s long ball behind the sleepy back line and rounded Howard before side-footing a shot into the inviting target — a stunning development given the stakes and the discrepancy in roster power.

The U.S. team’s defensive frailty had been exposed again and, despite the final outcome, it remains a soft spot heading into more treacherous territory next year.

“You don’t want to let a team grow in spirit and grow in confidence,” forward Herculez Gomez said. “It was important for us to put out that fire.”

The Americans needed five minutes. Dempsey made a near-post run on Graham Zusi’s corner kick and flicked the ball into the six-yard box to Bocanegra, who stabbed in a one-timer for his 14th international goal, a record for a U.S. defender.

“I think [the U.S. players] understood the moment,” American Coach Juergen Klinsmann said, “and that’s why they responded well after the first goal.”

Waves of attacks crashed into Guatemala’s brittle resistance. The go-ahead breach came on an attack launched by right back Steve Cherundolo’s long ball. Eddie Johnson met it in stride and crossed to Dempsey for the simple finish.

Later, Zusi crossed to Gomez, who touched a diagonal ball to Michael Bradley for a chip over goalkeeper Ricardo Jerez. Dempsey ensured it reached the destination, tapping in for his 30th international goal.

The Americans weren’t content. After absorbing Guatemala’s surge at the start of the second half, they generated three quality opportunities. But Johnson, a two-goal scorer at Antigua, suffered from faulty finishing, giving the Chapines a remote lifeline.

Howard recovered from an initial spill to clear a threat and the U.S. defense stood tall.

“We expected a very difficult qualifying campaign, and that is what it is,” Klinsmann said. “We didn’t necessarily want it to go down to the wire, but that’s how soccer works. When you give away a game [at Jamaica last month], you pay the price for a while. You need to correct it and the guys corrected it.”

SPAIN 1, FRANCE 1: In Madrid, Spain’s 24-game winning streak in qualifiers ended when Olivier Giroud scored in the fourth minute of second-half stoppage time, giving France the tie in qualifying for the 2014 World Cup.

Sergio Ramos scored on a 25th-minute header for Spain, the defending World and European champion. Cesc Fabregas failed to convert a 43rd-minute penalty kick at Madrid, and Giroud scored off a cross from Franck Ribery after second-half substitute Juanfran Torres turned the ball over in midfield. Spain is ahead of France on goal difference in Group I.

GERMANY 4, SWEDEN 4: Germany wasted a four-goal lead in a draw with Sweden in Berlin.

The hosts had surged ahead as Miroslav Klose scored in the eighth and 15th minutes, and Per Mertesacker (39th) and Mesut Oezil (55th) added goals.

Germany’s 13-game winning streak in qualifying ended as Sweden got goals from Zlatan Ibrahimovic in the 62nd minute, Mikael Lustig in the 64th, Johan Elmander in the 76th and Rasmus Elm in the third minute of stoppage time.

“I don’t know how to explain it,” Germany Coach Joachim Loew said, whose teams leads Sweden by three points in Group C. “Normally, we would not waste a four-goal lead.”

HONDURAS 8, CANADA 1: Canada dropped out of the top two in its group in North and Central America and the Caribbean with its loss to Honduras in San Pedro Sula. Honduras, which led 4-0 after 25 minutes, got three goals each from Jerry Bengston and Carlo Costly, and two from Mario Martinez. Honduras advanced from Group C along with Panama, which tied 1-1 at Cuba. . . .

It was also a frustrating night for Cristiano Ronaldo, whose 100th appearance for Portugal ended in a 1-1 tie at home against with Northern Ireland.

England’s qualifier against Poland was postponed until Wednesday because of heavy rain in Warsaw.