Premier Mark McGowan made the shock announcement at 3pm local time, after two people spent several days in the community while infectious.
But shoppers filled supermarkets across the state even before the lockdown was confirmed, emptying shelves in a repeat of scenes from around the world a year ago.
Perth supermarkets (pictured) were swamped by panic buyers after the city was thrown into a snap three-day lockdown on Friday
In suburbs such as Innaloo, Claremont and Ellenbrook, QR scanning on store entry was largely ignored as panic set in on Friday once the lockdown was confirmed
Rice, pasta, milk and water flew off the shelves, as did toilet paper.
In suburbs such as Innaloo, Claremont and Ellenbrook, QR scanning on store entry was largely ignored as panic set in.
As the lockdown was confirmed by the premier, shoppers started to queue through the aisles and lined up to pay for goods impatiently.
The lockdown will remain in place for three days from midnight tonight.
All supermarkets will remain open, with normal trading hours.
Residents in Perth and Peel must wear face masks at all times, and can only leave their homes to pick up essentials or for medical needs.
Working remotely is encouraged, and exercise is also permitted, but only for an hour and in groups not exceeding four people.
The new cases include a 54-year-old man who stayed in the Mercure Hotel, the source of the outbreak, and completed quarantine on April 17 after arriving from China.
Lines were extended and aisles quickly filled as panic buying set in after the lockdown for three days was confirmed by premier Mark McGowan
He spent his first night out of quarantine at the home of a friend, a Kardinya mother-of-two who has also tested positive.
Her children have tested negative.
The man visited locations throughout the city, including popular tourist spot Kings Park, before leaving Perth on April 21.
Genomic testing has confirmed the virus initially spread in the corridors of the Mercure Hotel from a couple who had returned from India.
A pregnant mother and her four-year-old daughter who were staying across the corridor tested positive and remain in quarantine at the hotel.
Once again, toilet paper (pictured) was snapped up by panic buyers after the announcement of a three-day lockdown from Friday night
The man who tested positive in Victoria had been staying in a room adjacent to the couple from India. Victorian authorities on Friday said he was asymptomatic.
Mr McGowan said he hoped the lockdown would not need to be extended.
‘I know this is hard to take and I wish we didn’t need to be doing this,’ Mr McGowan told reporters.
‘But we can’t take any chances with the virus.’
People in the locked-down regions will only be allowed to leave their homes for four reasons: work if they are unable to do so from home, shopping for essential items, medical or healthcare needs or exercising for one hour per day.
Crowds will be allowed to attend Friday night’s NBL and Super Rugby fixtures in Perth but will be required to wear masks.
The premier said he would personally discourage people from attending.
No crowds will be allowed at Saturday night’s AFL clash between Fremantle and North Melbourne at Optus Stadium.
Water, (pictured) rice and pasta were three other items countless shoppers snapped up across the state in Perth
Police Commissioner Chris Dawson said the midnight start time for the lockdown reflected the fact that it was the earliest time police could be deployed to vehicle checkpoints.
The man who tested positive after leaving the Mercure also spent four nights in short-stay accommodation at the University of Western Australia.
He flew to Melbourne on flight QF778 which departed on Wednesday carrying 257 passengers.
Victorian authorities are contact-tracing passengers and anyone who has returned to WA will be required to self-quarantine for 14 days.
NSW Health said it would commence screening of flights from Perth to identify any passengers who may have attended exposure sites in WA.
Queensland will require anyone who has been in Perth or Peel since April 17 to comply with the requirements of the WA lockdown.
Mr McGowan will seek to limit WA’s international arrivals to 512 a week for the next month.
WESTERN AUSTRALIA’S LOCKDOWN RULES
* Perth Metropolitan and Peel regions have entered a three-day lockdown from midnight on Friday.
* People must stay at home unless shopping for essential supplies such as groceries, attending to medical or healthcare needs, exercising with one other person for up to an hour in your neighbourhood, or attending work if working remotely is not possible.
* No visitors allowed in homes unless caring for a vulnerable person or in an emergency.
* Masks to be worn at all times outside of home, including at work, on public transport and while doing non-vigorous exercise.
* Anzac Day dawn services to be cancelled, with people instead encouraged to stand at the end of their driveways.
* Casinos, nightclubs, entertainment venues and public venues all required to close.
* Community sport not permitted. No crowds at professional sporting events.
* Restaurants, cafes, pubs and bars to provide takeaway service only.
* Weddings and funerals permitted with a limit of 100 attendees.
* People should not leave the combined Perth and Peel regions during this period.
* Others can enter those regions only to access or deliver essential health and emergency services, or other essential needs.
* No visitors to hospitals, residential aged care or disability facilities unless there are exceptional circumstances.