The US won 2-0 at home against Mexico while Costa Rica drew 1-1 at Jamaica at the Confederation of North, Central American and Caribbean Association Football (Concacaf) regional qualifying match on Tuesday.
Their berths in the 2014 soccer tournament were confirmed when Honduras drew 2-2 against Panama later Tuesday.
Eddie Johnson and Landon Donovan scored in the second half for the Americans, which will be playing in a seventh-straight World Cup.
"I'm proud of this team. I'm proud to be a part of it," Donovan said.
"These guys put in a lot of hard work over the last two years and to have an opportunity in front of a crowd like this to qualify is pretty special."
Mexico slipped to fifth in the six-team group and its chances of even taking the fourth place, which yields a further intercontinental playoff, are in jeopardy.
"This a team that could and should play better," said Luis Fernando Tena, who replaced "Chepo" de la Torre as Mexico's coach following Friday's home loss to Honduras.
"It has to take a step forward if we want to make it to the World Cup."
Costa Rica also had to wait on the late result to know it had booked its World Cup berth.
Randall Brenes gave the Ticos the lead in the 74th minute before Jermaine Anderson snatched a point for last-placed Jamaica by scoring in the second minute of stoppage time.
It will be a return to the World Cup for Costa Rica, which appeared at the 2002 and 2006 World Cups but did not qualify for South Africa 2010.
The Concacaf qualifiers will resume on October 11, when Mexico will be at home against Panama in a crucial clash between the teams in fifth and fourth place respectively, locked together on eight points. – Sapa-AP