Perth Glory defeated 10-man Melbourne City 3-1 in a Friday night A-League contest which came precariously close to farce.
Mitch Nichols, Xavi Torres and Mitchell Mallia scored the goals at AAMI Park, with reinstated City striker Ross McCormack replying with a stunning free kick.
But a first-half video referee decision changed the match, with Osama Malik contentiously sent off for a late studs-up tackle on Glory youngster Jacob Italiano.
Before Malik's dismissal and Torres' penalty conversion, the contest was evenly poised.
McCormack's set piece cancelled out Nichols' 12th-minute opener in a match played at ferocious intensity and in a thunderstorm.
There was yet more first-half drama.
Andy Keogh was forced off with a leg injury and his coach Kenny Lowe became the first manager to receive a yellow card under the world-first A-League trial.
But nothing had the impact of the VAR, which will face heated criticism after another game-changing intervention.
Referee Daniel Elder originally missed the clash between Malik and Italiano, with the official upstairs suggesting the review.
No one at City could believe the reversal -- after a two-minute delay -- and least of all Malik, who faces a lengthy ban after his second red card of the season.
Warren Joyce led the protestations off the bench, with City's players venting their frustration across the rest of the match.
City battled valiantly to get back into the match.
Joyce threw on Tim Cahill for the final 20 minutes as they chased the game and the veteran had the ball in the net on 73 minutes with a thumping volley, only to be deemed offside.
Instead, substitute Mallia capitalised on Nick Fitzgerald's unfortunate slip to score a breakaway one-on-one with seven minutes to go and secure the result.
The win is just Perth's fourth away success in 21 matches - three of which have come against City at AAMI Park.
The precious three points lift the Glory to fourth on the A-League ladder.
City stay third but are winless in four matches -- after starting the season with four-straight wins.