Republic of Ireland booked their place in the Euro 2012 play-offs with a controversial 2-1 win over 10-man Armenia at the Aviva Stadium on Tuesday.
Giovanni Trapattoni's side needed just a draw to stop third placed Armenia moving above them into second place in Group B and they were gifted a significant advantage when Armenia goalkeeper Roman Berezovsky was harshly sent off for deliberate handball midway through the first half.
Replays suggested Spanish referee Eduardo Iturralde Gonzalez had got it wrong as Berezovsky appeared to block Simon Cox's shot with his chest, but Ireland took full advantage through Valeri Aleksanyan's own goal and a Richard Dunne strike.
Henrik Mkhitaryan reduced the deficit soon after Dunne's goal and Trapattoni's team had to endure a nervous finale after Kevin Doyle was sent off for two bookings in the closing stages.
But Ireland had done enough to seal their spot in next month's two legged play-offs that will decide the final qualifiers for next year's finals in Poland and Ukraine.
With captain Robbie Keane injured, Cox got the nod ahead of club-mate Shane Long even though he hasn't start a Premier League game for West Brom this season and it proved a successful gamble by Trapattoni.
He was in the thick of the action right from the start. When Doyle flicked Shay Given's clearance into Cox's path, he cleverly found his strike partner with a return pass to give Doyle the chance to test Berezovsky for the first time.
Ireland kicked-off with slender hopes of winning the group if leaders Russia lost at home to Andorra, but those dreams were dashed before half-time as the Russians raced into a 4-0 lead.
That left Ireland to hold onto second place and they received a major boost when Berezovsky was sent off in the 26th minute.
Berezovsky contributed to his own downfall with a slightly rash decision to race out of his penalty area as Cox chased a long pass over the top of the Armenia defence.
But he managed to block Cox's shot with his chest even though he had both arms raised. The sight of Berezovsky's flailing arms convinced Gonzalez to send him off for deliberately denying a goalscoring opportunity but the Armenian had a strong case for complaint.
To add insult to injury, Cox definitely was guilty of handball as replays showed he controlled the ball with his arm before running through on goal.
Ireland couldn't take advantage from Aiden McGeady's resulting free-kick and Marcos Pizzelli shot wide from long-range as Armenia tried to fight back.
However, after such a cruel blow it was essential for Armenia to hold out until half-time and the visitors' fate was effectively sealed as they gifted Ireland the lead in the 43rd minute.
Damien Duff drove a low cross toward Doyle in the six-yard box and the Wolves striker tried a back-heeled effort that failed to make contact.
It should have been easy for Aleksanyan to clear, yet he somehow managed to divert the ball into his own net under no pressure at all.
Armenia shot themselves in the foot again as Ireland increased their lead in the 59th minute after a blunder from substitute goalkeeper Arsen Petroysan.
McGeady's cross should have been easy for Petroysan to collect but he got in a tangle and allowed Dunne to deflect the ball into the net from close range for his first international goal in two years.
To their credit Armenia kept going and Mkhitaryan got one back when he punished slack Ireland marking to slot home from the edge of the penalty area in the 62nd minute.
There were a few nerve-jangling moments after Doyle was dismissed for jumping with his elbow -- ruling him out of the first leg of the play-offs -- but Ireland kept their composure to secure second place.