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
Bondi Beach Statement
Police issue 31,000 driving infringements in first month of new AI cameras
Works underway on Rockingham and Safety Bay High School redevelopments
New measles exposure sites revealed in Bunbury
Dawesville man charged after allegedly leaving his elderly Great Dane to suffer painful conditions
Good Samaritan sought by police after helping teen during robbery in Baldivis
Under-16s social media ban now in force
Desperate search continues for missing Bunbury FIFO worker
Passengers now able to use credit, debit cards to tag on and off WA's public transport