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
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