Melbourne City scored twice in the final six minutes to beat 10-man Western Sydney Wanderers 4-3 in a thrilling A-League contest on Tuesday.

The Wanderers had looked on track to end a five-match losing streak after going 3-2 up early in the second half, but Keanu Baccus' sending off for two bookable offences gave City the initiative and they downed their visitors late on.

Ritchie de Laet scored the first of his two after just 31 seconds, skipping past goalkeeper Nick Suman before tapping into an empty net.

Roly Bonevacia levelled from the spot just before the half-hour mark after Curtis Good brought Jaushua Sotirio down in the box, but Luke Brattan's sensational 25-yard strike 10 minutes later saw City go into the break ahead.

However, within eight minutes of the restart, City were trailing – Tass Mourdoukoutas heading in the equaliser, before Sotirio found the top corner in style from just outside the area with his weaker left foot.

The tide turned again in the 66th minute, when Baccus was shown his second yellow card for a late challenge on Bart Schenkeveld, and City capitalised through De Laet towards the end – the former Manchester United defender producing a clever turn and finish.

Schenkeveld clinched the dramatic victory in stoppage time, emphatically heading a corner delivery in, moving City to within two points of Sydney a place above them in third.