George Blackwood missed a 99th-minute penalty as Western Sydney Wanderers held on to beat Adelaide United 3-2 and snap a seven-game winless run in the A-League.
The Wanderers conceded late on to draw with Western United last week and looked set to do likewise in Friday's clash at Coopers Stadium.
Mohamed Adam added to Nicolai Muller's headed double to give the visitors a 3-1 lead, but Blackwood converted from the spot 94 minutes in and had a chance to snatch a point even deeper into stoppage time.
The Adelaide midfielder blazed over the bar with his next attempt from 12 yards, though, as Wanderers edged a dramatic contest that threatened to boil over a number of times.
Muller reacted quickest to head Adam's deflected cross past Paul Izzo against the run of play, but Al Hassan Toure equalised eight minutes later with a close-range finish.
Tempers frayed a number of times in the first half but Muller kept his cool to send a sublime looping header into the far corner with just under an hour played.
Adam then beat Daniel Lopar at the second time of asking before Blackwood converted from the spot after VAR intervened following a foul on Toure, setting up a thrilling finale.
The Wanderers had not won since October 26 and their winless streak looked set to continue when VAR adjudged Daniel Georgievski handled the ball in the box, a decision that led to the defender storming off the field in protest.
But they were given a reprieve as Blackwood fired the spot-kick over the crossbar deep into stoppage time.