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.
Teen boy killed after being struck by two cars while crossing road in Warnbro
Free supplies, health checks, advice for Mandurah pet owners
Rockingham Detectives ask for public's help to find wanted man
LISTEN: WA Police release triple-0 call from shooting murder of bikie boss Nick Martin at Kwinana Motorplex
Police pursuit comes to crashing end in East Rockingham
Tensions boil over in Rockingham council chambers as motion to reinstate weekly red bin collections is defeated
WA's first public National War & Service Animal Day commemoration to be held at Dawesville War Memorial
New road safety laws to be named in memory of Furnissdale hit-and-run victim
UK nuclear submarine docks at Rockingham's HMAS Stirling