(CNN) -- Italy scored a last-gasp equalizer away to the Republic of Ireland on Saturday to ensure that the World Cup champions will be in South Africa to defend their title next year.
Mauro Camoranesi brought Italy level in Dublin with his header in the first half.
Substitute Alberto Gilardino's 90th-minute goal made it 2-2 soon after Sean St. Ledger's spectacular header seemed to have given Ireland coach Giovanni Trapattoni an emotional win against his home nation.
Victory would have given the Irish a chance to top Group Eight in Wednesday's final round of qualifiers, but they have the consolation of a playoff place after Cyprus ended third-placed Bulgaria's hopes with a 4-1 victory at Larnaca.
Glenn Whelan had lifted the Dublin crowd with a crashing eighth-minute opening goal after a well-worked free-kick move with Liam Lawrence, but Mauro Camoranesi stole in with a near-post header to level the scores 18 minutes later.
Italy had a goal ruled out for offside soon after the halftime break as the offender Vincenza Iaquinta touched Giorgio Chiellini's header into the net.
Ireland kept battling for a win that would have taken them to within a point of Italy, and went ahead in the 87th minute when St. Ledger launched himself low to meet a left-wing free-kick from substitute Stephen Hunt and head his first international goal.
But Trapattoni was left to ponder what might have been as St. Ledger allowed Iaquinta too much time in the penalty area to set up a simple sidefoot shot for Gilardino's 13th goal for his country.
The visitors had debutant Jerome Boateng sent off in the 69th minute, but Joachim Low's side held on to establish an unassailable four-point lead with one match still to play.
The Russians will now have to go to the playoffs next month for the eight best second-placed teams, with the draw to be made on October 19.
Guus Hiddink's team were already assured of that consolation prize, with third-placed Finland still four points adrift despite beating Wales 2-1 on Saturday.
Russia started strongly in Moscow, with striker Aleksandr Kerzhakov having two early chances and Vladimir Bystrov denied by the legs of Germany goalkeeper Rene Adler.
However, Lukas Podolski and Mesut Ozil combined to set up Klose in the 34th minute, and the veteran forward did well to divert Ozil's cutback inside the near post.
In the second half, Adler twice denied Andrei Arshavin and then was relieved to see his save from Yuri Zhirkov squirm wide of the post.
Fullback Boateng was dismissed for his second yellow card after a foul on Bystrov, but the Russians could not take advantage of their extra man.
The home side were left feeling aggrieved when referee Massimo Busacca did not award a penalty when Bystrov was brought down again, this time by Arne Friedrich.
In Helsinki, Finland took the lead after just five minutes through Roni Porokara after Wales goalkeeper Wayne Hennessey parried a shot by veteran forward Jonatan Johansson, but Craig Bellamy equalized from David Vaughan's low cross on 17.
Fullback Niklas Moisander drove in the winner from the edge of the penalty area in the 76th minute, while Finland goalkeeper Jussi Jaaskelainen denied Vaughan a last-gasp leveler to leave Wales eight points adrift of the Finns in fourth place.
Group Five winners Spain, who qualified last month, marched to a ninth successive victory on Saturday, winning 2-1 away to bottom-placed Armenia thanks to a 64th-minute penalty from Juan Manuel Mata.
Midfielder Cesc Fabregas gave the European champions a 33rd-minute lead, but Robert Arzumanyan headed an equalizer just before the hour mark.
Bosnia-Herzegovina clinched second place and a playoff berth with a 2-0 win away to Estonia, as strikers Edin Dzeko and Vedad Ibisevic scored in each half.