Shane Duffy got the Republic of Ireland out of jail as they left it late to rescue their first point of the World Cup qualifying campaign with a face-saving 1-1 draw against Azerbaijan.
Duffy's 87th-minute header, his fifth international goal, cancelled out Emin Makhmudov's stunning first-half strike and belatedly opened Ireland's Group A account at the fourth attempt on an evening when they stared further embarrassment full in the face.
Azerbaijan, ranked 112th in the world by FIFA, came perilously close to repeating Luxembourg's shock victory in Dublin, and while Stephen Kenny's men at least avoided that fate, their faint qualification hopes suffered a potentially fatal blow as their wait for a competitive victory stretched to 15 games.
Kenny, who won plaudits for his side's display in an agonising defeat against Portugal in midweek, saw a team including 19-year-old Troy Parrott, Adam Idah, 20, and 21-year-old Aaron Connolly fail to create the chances needed to prosper and very nearly succumb to a sucker punch which would have added further fuel to his critics.
They made an enterprising start with Matt Doherty heading wide from Josh Cullen's cross and Connolly seeing his shot blocked after Idah had out-stripped defender Hojjat Hahgverdi.
Skipper Seamus Coleman might have done better when he burst onto the ball and stepped inside before sending a left-foot shot wide of the target.
Azerbaijan gradually emerged from a testing start with Namik Alaskarov firing in a long-range shot which was fielded comfortably by Gavin Bazunu, and the goalkeeper had to get down well at his near post to turn away Alaskarov's dipping 23rd-minute effort with the home side waning.
Jayson Molumby curled a shot a foot wide after being set-up by Connolly after Cullen had reinjected some of the early intensity into Ireland's play from the middle of the field.
Idah then headed wide at the near post after getting across his man to meet Connolly's inviting 32nd-minute cross.
The Brighton man was having an increasing influence from his position wide on the left, and it was he who forced keeper Shakhrudin Magomedaliyev to save at the second attempt after cutting inside with eight minutes of the first half remaining.
But it was Bazunu who found himself picking the ball out of his net in first-half stoppage time when midfielder Makhmudov was given time and space to dispatch a curling right-foot strike from distance beyond the teenager's despairing dive to ensure it was the visitors who went in ahead at the break.
Daryl Horgan replaced Connolly at half-time and he almost made an instant impact when his 47th-minute cross was met by the late-arriving Molumby, who was unable to keep his header under the crossbar.
Kenny's men upped their tempo as the game reached the hour mark with Parrott testing Magomedaliyev with a snapshot and Idah heading wide from a Horgan cross with the Azerbaijan rearguard showing signs of wilting.
Coleman saw a 64th-minute attempt blocked on its way to goal and substitute Conor Hourihane curled another wide seconds later, while Duffy headed over from Callum Robinson's 69th-minute cross with the visitors now pinned back deep inside their own half.
It might have been worse for the Republic had Bazunu not managed to block substitute Rystam Akmedzade's 81st-minute shot with his foot, and his intervention proved decisive as Ireland hit back in the nick of time when Duffy rose to power a header past Magomedaliyev from Cullen's cross to level and spark a late frenzy.