(CNN) -- France kept alive their hopes of defending their Six Nations grand slam title with a 25-22 win over Ireland in Dublin Sunday.
The home side ran in three tries to one at Lansdowne Road but ill-discipline cost them dear as France kicked six penalties, five from the boot of Morgan Parra.
After two rounds of matches only France and England have perfect records and meet in a likely championship decider at Twickenham in a fortnight's time.
Ireland's tries came from Fergus McFadden, with his first try for his country, Tomas O'Leary, who had been unable to train all week because of an injury worry, and Jamie Heaslip.
McFadden crossed as early as the fifth minute and Jonathan Sexton converted for a 7-0 lead but Parra's penalties kept chipping away at their lead.
O'Leary dived over for the Irish second try as they led 15-12 at halftime, but the French drew level with Parra's fifth successful kick just after the break.
They went ahead for the first time as Aurelien Rougerie burst clear before supplying Maxime Medard with the scoring pass.
Dimitri Yachvili, who had just replaced Parra, converted to make it 22-15 and then landed another penalty to increase the lead to 10 points.
But the never-say-die Irish gave themselves late hope as Heaslip was found by fellow backrower David Wallace and the No.8 went over in the corner.
Ronan O'Gara, who had replaced Sexton, converted from the touchline to make it 25-22 but despite late pressure following a French mistake it was the visitors who held on for victory.
French captain Thierry Dusautoir was relieved his side had overcome a difficult hurdle.
"It was a very tough game, perhaps not the game of the year but a very important one to win," he told the BBC. "Thank goodness we stayed in it despite only scoring one try. I'm very happy and proud of the team - it's never easy to come here."