Veteran striker David Williams scored a dramatic 93rd-minute winner as Perth Glory came from two goals down to snatch a 3-2 A-League Men victory over Macarthur at HBF Park.
First-half goals from French striker Valere Germain and Matthew Millar gave Macarthur a 2-0 lead on Saturday night, but scores were level by the 65th minute after Salim Khelifi and Luke Ivanovic hit the scoresheet.
Glory pushed hard for the winner, and it was Williams who stepped up in stoppage time to the delight of the crowd of 5163.
After an excellent flick-on from Adam Taggart, Williams sprinted forward before nailing his low drive from the edge of the box.
The 35-year-old was mobbed by his teammates and fans after scoring the goal, with the result snapping a five-match winless run and lifting Glory off the bottom of the table.
"It was a rollercoaster of a game in terms of emotions," Glory coach Alen Stajcic said.
"It's good we could flip the script. We've been heartbroken a couple of times this year where we've conceded late goals.
"So it was good for the boys to get a little bit of confidence and know that we can do it the other way as well and come from behind and produce that comeback."
Fourth-placed Macarthur have now lost back-to-back matches, their defeat by Perth following on from Monday's 3-0 loss to Wellington.
Adding to their woes was a serious-looking hamstring injury to former Glory whiz kid Danny De Silva.
De Silva was lively in the first half, but his night ended in the 58th minute when he stretched to intercept a lofted pass and immediately pulled up lame in his right leg.
The 26-year-old, who used to be a fan favourite at Glory after making his A-League debut for the club when he was just 15, sat on the turf for a couple of minutes before despondently limping his way around the sidelines to the bench.
"It's always difficult and you always think the worst, but (we will tell him) just stay positive and work hard to get back as soon as possible," Macarthur coach Mile Sterjovski said.
"We're always there for him. So hopefully he'll come back stronger."
Macarthur hit the lead in the 30th minute when a sliding pass from Raphael Borges Rodrigues found Matthew Millar, who slotted the goal home from a difficult angle.
Perth were then made to pay dearly for two defensive mistakes in the lead-up to Macarthur's second goal in the 42nd minute.
Glory defender Jacob Muir was stripped of the ball and Giordano Colli failed to clear it a short time later in the lead up to a piece of play that resulted in Germain poking home the goal.
It took less than three minutes of the second half for Glory to finally strike gold, Khelifi's strike from the edge of the box deflecting in for a goal.
Ivanovic hit the scoresheet in the 65th minute when he thrust out his left boot to volley home a glancing header from Muir.
Williams completed the fairytale comeback with his heroics in stoppage time.