Javier Aguirre's Mexico side claimed a convincing 4-1 home win to end El Salvador's hopes of making it to South Africa, while America were 3-2 winners away to Honduras, in the penultimate round of North American qualifying.
Mexico knew they needed the three points and took the lead after 25 minutes through an own goal by Marvin Gonzalez after Cuauhtemoc Blanco had shot on goal.
El Tri extended their lead in the 71st minute when Blanco scored with his right foot from a Guillermo Franco pass.
With only six minutes to go, 36-year-old Juan Francisco Palencia made it 3-0, but Julio Martinez scored from a free-kick for El Salvador two four minutes later.
Carlos Vela added a fourth for Mexico in injury time.
Aguirre, who succeeded Sven-Goran Eriksson in April, felt qualification was the result of plenty of hard work.
He said: "I feel calm. When you achieve the goals you were hired to do you feel satisfied. There were some difficulties, not everyone likes you, but I know I will sleep well.
"It was an intense first half tonight. Tension makes you want to win the game before time. As soon as the team scored, they played better."
El Salvador's Mexican-born coach Carlos de los Cobos congratulated Aguirre and Mexico for clinching the World Cup qualification.
"Tonight, Mexico won deservedly and played a great match even though we also had important moments in the game," he said.
Bob Bradley's USA side had to work very hard for their 3-2 win over Honduras in San Pedro Sula, Conor Casey chipping in with a brace.
After a goalless first period, the Catrachos went ahead in the 47th minute when Julio de Leon beat Tim Howard with a decent shot.
However, Casey headed the ball home seven minutes later to level the game.
Casey scored again from Landon Donovan's pass in the 65th minute and Donovan himself extended America's lead from a free-kick six minutes later.
De Leon gave Honduras hope by scoring his second seven minutes later, but Carlos Pavon sent a glorious chance to equalise over the bar as Honduras slipped to fourth in the standings.
Costa Rica hammered 10-man Trinidad and Tobago 4-0 in San Jose to move up to third in the standings.
An own goal by Julius James put Costa Rica ahead in the 26th minute and Walter Centeno doubled the lead five minutes into the second half after being set up by Alvaro Saborio.
Saborio himself netted a quickfire brace midway through the second half before James saw his night go from bad to worse when he was sent off.
The Ticos could have scored a fifth but Trinidad keeper Marvin Phillip saved a Randall Azofeifa penalty.
On Wednesday Costa Rica and Honduras will battle it out for the last automatic World Cup qualifying spot.
The Ticos will claim it if they win away to the USA. If they draw or lose Honduras can seal their place in South Africa with a win over El Salvador. The side who misses out and finishes fourth will face a play-off against the fifth-placed side in South American qualification.