The Liberal Party's decision to focus on the Darling Range by-election instead of running candidates in upcoming federal votes has been a success.
Liberal candidate Alyssa Hayden defeated Labor's Tania Lawrence 53 to 46 per cent on a two party preferred basis.
Ms Hayden scored 34.39 per cent of the vote before preferences ahead of Ms Lawrence on 32.11.
One Nation candidate Rod Caddies secured 7.3 per cent of the primary vote.
During her victory speech Ms Hayden told voters she saw the campaign as a race between herself and State Premier Mark McGowan.
"[Voters] have been disappointed and they've been abandoned," she said.
"Today they sent a strong message to Mark McGowan and as i've said a few times in this campaign my opponent was Mark McGowan."
We might not have been successful tonight - but we’re incredibly proud of @walabor's positive campaign. #wapol pic.twitter.com/LMpSvKPt7v
— Mark McGowan (@MarkMcGowanMP) June 23, 2018
Mr McGowan denied the result was a loss of confidence in the Labor Government instead blaming the defeat on campaign controversy.
"It was a very tough by-election and very tough circumstances as we are all aware," he said.
"The result is one we will review, clearly, in coming days and weeks, and take heed of what the people of Darling Range have said to us."
The by-election was triggered by the resignation of former Labor-turned-Independent member Barry Urban amid revelations he lied to parliament about his work and education history.
Labor then announced former Regional Development Australia Perth chief executive Colleen Yates as their candidate.
Her campaign was short lived after it was revealed she was dishonest about her education history on LinkedIn.
State Opposition Leader Mike Nahan also had some strong words for the Premier.
“If you don’t stop breaking promises, increasing fees and charges, and cutting services, you will be a one-term premier,” he said.
What a WIN! The swing is a clear message to the Labor government: the community aren’t happy with you and they’re standing up for themselves.
— Mike Nahan (@MikeNahan) June 23, 2018
Congratulations to @AlyssaKHayden, the newest Liberal MP! You’re going to do a brilliant job representing the people of Darling Range!
Counting cannot resume until postal votes are received on Thursday afternoon.
Mandurah Crab Fest boasts huge range of free, family friendly entertainment
Fuel prices surge in Perth, Mandurah
Teen boys charged over Mandurah burglaries
Tragic update in search for missing man Robert Snyder
Premier Roger Cook to leave Kwinana electorate, move to Perth
Mandurah Marine Rescue's new vessel named in memory of nun who survived 1959 boating accident
Teen dies in motorbike crash at Waroona Dam
Shark alert issued after whale carcass reported at Preston Beach
Kwinana businesses to refuse serving students during school hours