Joseph Chipolina's own goal and a late effort from substitute Robbie Brady handed the Republic of Ireland a Euro 2020 qualifying victory over Gibraltar.
On a night when 36,281 turned up at the Aviva Stadium hoping for a goal-fest, Mick McCarthy's men needed a stroke of good fortune to set them on their way to three points courtesy of a 2-0 win which keeps them at the top of Group D with 10 from their opening four games.
The Republic, whose arrival at Lansdowne Road was delayed when they had to change buses after a mechanical failure, misfired despite dominating possession against stubborn opposition and took the lead when David McGoldrick's 29th-minute shot hit the unfortunate Chipolina and ended up in the net.
McGoldrick later struck an upright before Brady came off the bench to score in added-time but the game ended with he and fellow frontmen Callum Robinson, Scott Hogan and Sean Maguire still awaiting a first goal for their country and having seen a golden opportunity pass them by.
McCarthy had insisted in the run-up to the game that the style in which his side won did not concern him as long as they won, and admitted he would take a goal going in off somebody's backside if it secured three points.
His comments proved somewhat prophetic and while he may be satisfied with the result and elements of the performance, the cutting edge his team will need to convert a decent start into qualification with far more testing fixtures to come during the second half of the campaign was sadly lacking.
The hosts might have been ahead as early as the second minute had Shane Duffy, who scored their equaliser in Denmark on Friday, made meaningful contact with Conor Hourihane's cross, and McGoldrick blazed wide when he might have done better seconds later.
As anticipated, Gibraltar packed men behind the ball in an attempt to deny Ireland space in the final third, and the ploy paid dividends with McCarthy's men finding themselves thwarted repeatedly as Hourihane and Jeff Hendrick in the middle and Seamus Coleman and Robinson down the right tried to find a way through.
Too often, the final ball was missing and frustration was starting to mount when they were finally given a helping hand, albeit unintentionally.
Robinson found space down the right and when his pass was deflected into Coleman's path, he pulled the ball back for McGoldrick to sweep a shot towards goal, where it cannoned off Chipolina's chest and wrong-footed goalkeeper Kyle Goldwin. Replays suggested the initial effort was heading wide.
Preston's Robinson dragged a shot wide two minutes later and saw another fly inches past the far post with Goldwin beaten on the stroke of half-time, but Gibraltar remained firmly in the game at the break.
The Republic continued to make all the running after the restart, but once again, a lack of precision cost them dearly.
Full-back Enda Stevens blasted high over from distance and Hogan saw a header from a Hourihane cross saved comfortably but Darren Randolph was called upon for the first time with 56 minutes gone when he had to field Liam Walker's deflected shot after the visitors had broken at pace.
Jeff Hendrick and Robinson had shots blocked in quick succession and Goldwin saved well from Hogan at his near post as Ireland pressed once again.
McGoldrick rattled the woodwork after creating space for himself with 18 minutes remaining and the clock had ticked deep into stoppage time when Brady made sure of the win, heading James McClean's cross powerfully home.
ga('create', 'UA-72310761-1', 'auto', {'name': 'pacontentapi'});
ga('pacontentapi.set', 'referrer', location.origin);
ga('pacontentapi.set', 'dimension1', 'By Damian Spellman, Press Association Sport');
ga('pacontentapi.set', 'dimension2', 'c4bb07c7-998c-41a7-8cbd-242975f39b44');
ga('pacontentapi.set', 'dimension3', 'paservice:sport,paservice:sport:football,paservice:sport:match-reports,paservice:sport:uk,paservice:sport:world');
ga('pacontentapi.set', 'dimension6', 'story');
ga('pacontentapi.set', 'dimension7', 'composite');
ga('pacontentapi.set', 'dimension8', null);
ga('pacontentapi.set', 'dimension9', 'sport:football');
ga('pacontentapi.send', 'pageview', { 'location': location.href, 'page': (location.pathname + location.search + location.hash), 'title': 'Republic fail to hit the heights but get the points'});