Western United have taken a big step towards securing a maiden A-League final while knocking Western Sydney out of contention with a thrilling 5-3 win at Netstrata Jubilee Stadium.
United stretched out to a 3-0 lead through Josh Risdon, Besart Berisha and Alessandro Diamanti, before Western Sydney pegged it back to 3-3 through Mitch Duke's brace and Tass Mourdoukoutas.
But late goals to Max Burgess and Diamanti stopped Western Sydney's late resistance and spared United's blushes.
"We showed great character at 3-3 -- it could have gone the other way," United coach Mark Rudan said.
"I've seen it probably 80% of the time in world football where teams have got a lead like that 3-0 lead and they give it away -- they go on to lose the match.
"So I thought that moment in particular was very rewarding."
In teeming rain, United seized control in the seventh minute when Burgess whipped a left-footed cross into the six-yard box where an inexplicably unmarked Risdon headed home.
In the 19th minute, Risdon helped double United's lead.
Diamanti slipped a ball through for the full-back, who skidded a delightful cross past the Wanderers' defence for a surging Berisha to dispatch his 16th goal of the season.
United thought they had sealed the deal through Diamanti's spectacular 52nd-minute effort.
He played a short corner, received the ball back and lofted a left-footed chip over goalkeeper Tristan Prendergast.
An unmarked Duke kicked off Western Sydney's unlikely resurgence in the 69th minute, heading home Bruce Kamau's looping cross.
Then, Mourdoukoutas latched onto Pirmin Schwegler's free kick with a delightful backheel to make it 3-2 in the 76th.
Six minutes later Duke volleyed home to level the scores and seemingly put the Wanderers in the box seat for an unlikely win. But those hopes were extinguished when Burgess caught Mourdoukoutas dallying on the ball, pinched it and ran on to restore the lead in the 84th minute.
Three minutes later Diamanti secured the points with a second classy chip.
"We started poorly today," Wanderers coach Jean-Paul de Marigny said.
"The last 15 minutes of the [first] half was excellent -- it was the way that we want to play and we were braver and we found the right solutions, and from there the game took its toll."
United closed the gap to sixth-placed Adelaide to two points with three games remaining.
Andrew Durante left the field in the 51st minute with a hip flare-up but Rudan expected him to be ready for Wednesday's clash with Perth, while Seb Pasquali was rested.