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
Southern suburbs man claims $2.5 million Lotto win
Wanted man possibly in Mandurah or Rockingham areas
Big fines for three fisherman caught with too many mullet, undersized crabs
Brand new six-storey hospital to replace Peel Health Campus
Drug and Firearm Squad swarm Meadow Springs home
Wanted woman known to frequent Mandurah, Rockingham, West Pinjarra areas
Waikiki Beach Hotel to go ahead after liquor licence approved
Man found critically injured outside Baldivis pub
Dawesville man charged with 38 child sex offences