Troy Parrott's first international goals spared the Republic of Ireland's blushes as they came from behind in Andorra to finally hand manager Stephen Kenny victory at the 12th attempt.
The 19-year-old Tottenham striker cancelled out Marc Vales' shock 52nd-minute opener with a sweet strike and then powered home a header to restore order in Andorra La Vella, with Jason Knight and substitute Daryl Horgan wrapping up a 4-1 win as time ran down.
Parrott's timing could hardly have been better with Ireland facing humiliation in the tiny Pyrenean principality less than three months after their 1-0 World Cup qualifier defeat by Luxembourg.
Kenny's men failed to muster a single attempt on target in a frustrating first half, but were stung into action after Vales' intervention to quash Andorra's hopes of claiming just an eighth win in their history.
- How the teams lined up | Match stats
- Republic of Ireland fixtures
- Get Sky Sports
- Live football on Sky Sports
The goal aside, keeper Gavin Bazunu was a virtual spectator, but the manager will have been concerned by the lapse in concentration which handed the home side an opportunity to beat him, and the lack of cutting edge his team displayed until Parrott imposed himself upon the game.
Full-backs James McClean and Matt Doherty were swift to exploit the space ahead of them in the early stages, although without being able to find the required quality of cross to make it count.
Anderlecht midfielder Josh Cullen proved equal to the task of mopping up as a series of attacks by the home side floundered in the final third, although Ireland were struggling to play the passing game advocated by Kenny on the tricky artificial surface at the Estadi Nacional.
Even Conor Hourihane's set-piece deliveries were not up to his usual high standard with the Andorrans successfully frustrating the visitors to the extent that keeper Iker Alvarez, the son of manager Koldo Alvarez, did not have a save of note to make inside the opening 45 minutes.
However, James Collins should have done better when he dived to meet Knight's inviting 37th-minute cross, but glanced his header well wide of the target as Ireland belatedly started to move the ball in more cohesive fashion.
Kenny's men returned knowing they would have to be significantly better if they were to avoid another embarrassing chapter in their recent history.
But they were stunned within seven minutes of the restart when defender Vales climbed unopposed to head Alex Martinez's free-kick past the helpless Bazunu to give Andorra the lead.
Their advantage, however, lasted just six minutes as Parrott took his cue to open his senior account when he cut across the edge of the penalty area and waited for the perfect moment to dispatch a low shot past 19-year-old Iker.
Ronan Curtis might have put Ireland ahead seconds later after being played in by Parrott, only to fire wide, but the Spurs man, who spent the second half of last season on loan at Ipswich, took matters into his own hands with 61 minutes gone when he rose to send a firm header past Iker from Hourihane's cross.
Ireland dominated as the hosts wilted with 41-year-old Ildefons Lima one of a series of substitutes introduced in a bid to freshen things up, in the process becoming just the second man after Jari Litmanen to play international football in four different decades.
However, Knight converted Horgan's 84th-minute cross and then returned the favour with seconds remaining as the pair both registered for the first time for their country to make it 4-1.
Kenny: Confidence the difference
Stephen Kenny speaking to RTE:
"First of all, I don't know how it was our first win because we should have won several of them. I can't believe we didn't win some of the games we've played.
"It's a game we're expected to win, no doubt about that. Having said that, once you concede a goal on the run we've been on, there's a fair degree of pressure on the players.
"To come back in the manner and the way we did was excellent, to score four goals, real quality goals as well. It shows you the difference confidence can make
"Regardless of who scored, it was just important that we scored goals, because we had a period when we couldn't score.
"But it's a stiffer test against Hungary of course. They're going to the Euros, they've been in camp 10 days before this week as well. They'll be well drilled and we'll have to be at our best on Tuesday."
Republic of Ireland now go to Hungary on Tuesday at 7pm, live on Sky Sports Football, before starting their World Cup Qualifiers campaign in Portugal on September 1, live on Sky Sports.