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.
Authorities descend on Memorial Drive homeless camp, move on notices issued
Locals asked to have their say on new concept designs for Lakelands Youth Park
Baldivis boy one of two youths charged over Perth Zoo crocodile enclosure incident
North Pinjarra community park and recreation centre to undergo $800k upgrade
Cooloongup man charged with stealing 50m of copper cable
Dawesville couple convicted of shocking neglect of pet dog
Motorcyclist seriously injured after crashing into kangaroo near Mundijong
Daniel Bandy appointed CEO of Peel Thunder Football Club
Dwellingup comes alive ahead of Dwellingup 100 and Mighty Jarrah Trail Run event