Western Sydney Wanderers claimed an enthralling 3-2 derby win over Sydney FC to keep Melbourne City's four-point lead at the top of the A-League intact.

Steve Corica's men had designs on eating into that advantage but were caught cold by their neighbours at Bankwest Stadium on Saturday.

Bruce Kamau clattered home Ziggy Gordon's low right-wing cross via the upright in the 12th minutes and it was soon 2-0 when Mitchell Duke found the bottom corner on the end of Bernie Ibini's deft flick to crown a wonderful team move.

Sydney FC avoided any further damage before the break and Alex Wilkinson headed home Alexander Baumjohann's corner two minutes into the second period to breathe fresh life into the contest.

Wanderers substitute Scott McDonald was the beneficiary of further slack set-piece marking 16 minutes from time and the hosts appeared to be safe as the game ticked towards 90 minutes.

Sydney FC produced a remarkable late rally, though – Bobo blazing an 82nd-minute penalty over after the VAR penalised Western Sydney skipper Graham Dorrans for a challenge on Trent Buhagiar.

The experienced striker made amends by pouncing for his 50th A-League goal in stoppage time and there was still time for Anthony Caceres to smash a shot from outside the box against the underside of the crossbar.

Saturday's other matches lacked for similar drama as Macarthur's trip to Perth Glory and Brisbane Roar's home game against Wellington Phoenix each finished goalless.