Labor's Magenta Marshall will replace Mark McGowan as the new member for Rockingham.
Ms Marshall won nearly 50 per cent of the primary vote in the by-election, followed by Liberal candidate Peter Hudson with 17.7 per cent and independent Hayley Edwards coming at third with 16 per cent.
Ms Marshall called the election victory around 7.30pm on Saturday.
"I'm honoured to be elected as the new member for Rockingham! I'll always stand up for our community," Marshall said in a Facebook post.
Despite the win, Labor's primary vote fell more than 30 per cent since Mark McGowan's landslide election victory in 2021, which saw him receive 83 per cent of the primary vote.
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