Andrew Hastie has retained his Liberal seat of Canning in a close contest with Labor candidate Amanda Hunt.
With 99 per cent of the votes counted, Mr Hastie surpassed Ms Hunt by a margin of 5872 votes.
Mr Hastie attracted 54.12 per cent of votes in the Canning electorate, compared to Ms Hunts 45.88 in the two party preferred contest.
Despite the victory, Mr Hastie suffered a 7.44 per cent swing away from the Liberals, meaning the seat is now marginal.

Labor Leader Anthony Albanese with Canning candidate Amanda Hunt. PIC: Facebook
Digital drivers' licences to be introduced in WA
Mandurah FIFO worker wins $250k
2026 ANZAC Day services across the Peel and Rockingham regions
Mother of 11-year-old boy killed in Mandurah scooter crash found safe and well
Peel charity desperately seeks funds to keep doors open
Australind train service set to resume
Thunder premiership player Traye Bennell hangs up the boots
Works underway to protect 200-year-old 'Big Tree' in Greenfields
Wanted man believed to be in Mandurah area