Ben Waine headed a late winner as Wellington Phoenix came from behind to beat Western United 3-2 in an A-League thriller on Sunday.

Besart Berisha put United on course for a third consecutive win with a penalty 32 minutes in after Lachlan Wales was upended by Tim Payne at WIN Stadium.

Wellington were level on the stroke of half-time, though, when Ulises Davila struck from the spot, making Andrew Durante pay for handling in the area.

Jaushua Sotirio got on the end of a Davila volley to put the Phoenix in front for the first time, but Iker Guarrotxena nodded just over the line three minutes later to peg Ufuk Talay's side back.

There was a final twist, however, as Waine nodded in fellow academy graduate Sam Sutton's cross from close range and was able to resume his celebrations, which had been cut short by an offside flag, following a VAR check.

Wellington had suffered back-to-back defeats, but three points moved them up a place to ninth.