Robbie Keane took his international goals tally to 67 with a double to kill off battling Gibraltar on a night when the Republic of Ireland's hopes of Euro 2016 qualification received a significant boost.
The 35-year-old struck twice inside three second-half minutes to extended the first-half lead Derby full-back Cyrus Christie had given his side with his first goal for his country on his competitive debut and in the process, to kill off any hope of a shock.
Keane, who plundered a 13-minute hat trick against the same opposition in October's 7-0 win in Dublin, did not get the opportunity to repeat the feat when he was withdrawn with 20 minutes remaining as O'Neill cast an eye towards Monday night's clash with Georgia at the Aviva Stadium, and it was his replacement Shane Long who completed a 4-0 win in Faro.
The victory, coupled with Scotland's 1-0 defeat by the Georgians in Tbilisi earlier in the day, saw Ireland leapfrog Gordon Strachan's side in the table and rekindled their hopes of clinching a playoff spot for next summer's finals in France.
It was Gibraltar's seventh successive defeat in the group and they have now conceded 38 goals in total.
Despite the manager spending much of the week insisting there was no room for complacency, most who turned up at the Estadio Algarve were expecting, if not a repeat of the 7-0 drubbing his side handed out to the Gibraltarians in Dublin last October, then at least a comfortable victory.
In the event, his assertion that the group's whipping boys had improved considerably in the meantime proved correct as they provided stubborn resistance, aided by some good fortune and a lack of suitable service to Keane with both Wes Hoolahan and Jeff Hendrick misplacing a series of passes, to frustrate the Republic during the early stages.
Indeed, they came within two minutes of their longest competitive shut-out, the 28 minutes they managed against Germany in June, before Ireland finally broke the deadlock.
Keeper Jordan Perez had already clawed a sixth-minute Robbie Brady free-kick out of his top corner when central defender Ciaran Clark headed against the crossbar with the Gibraltarians very much on the back foot.
But after Jon Walters had seen a 12th-minute diving header correctly ruled out for offside, Jeff Wood's men grew in confidence and with strikers Lee Casciaro, the scorer of the nation's only competitive goal to date, and John Paul Duarte pressing the ball, there were several uncomfortable, if not critical, moments for the Irish defence.
However, Christie came to the rescue when he drilled a low shot across Perez with the outside of his right-foot and saw the ball squeeze inside the far post, and it would have been 2-0 with 28 minutes gone had the keeper not acrobatically turned Walters' dipping effort from distance over the bar.
But far from wilting, Gibraltar came back at the Republic and keeper Shay Given, winning his 131st senior cap, had to produce two diving saves to keep out long-range efforts from midfielder Liam Walker as the half drew to a close.
Ireland returned knowing there was work still to be done, but they turned the screw in devastating fashion inside the opening six minutes of the half as Keane ensured there would be no shock on the Algarve.
He was on hand to tap gleefully into an empty net when defender Jean Carlos Garcia could only turn Walters' driven 49th-minute cross against his own post and Perez was unable to prevent the ball squirming underneath him and into the arch predator's path.
Keane was taxed little further two minutes later when, after Hoolahan had been tripped by Walker as he stepped inside him, Croatian referee Marijo Strahonja pointed to the spot and the striker converted with customary aplomb.
The game was won, but there was still time for Long to help himself to a goal when he powered home a header from Jeff Hendrick's inviting cross to wrap up the win with 10 minutes remaining.