Five million residents of the Australian city of Melbourne have been told to stay at home for six weeks, amid a surge in coronavirus cases.
Victoria State Premier Daniel Andrews announced the lockdown after the state saw 191 new infections, its highest daily number since the pandemic began.
The state's borders with neighbours New South Wales and South Australia closed at midnight local time (14:00 GMT).
Australia has recorded almost 9,000 cases and 106 deaths from the virus.
But almost all new cases have been in Victoria.
"We are on the cusp of something very, very bad if we don't take these steps," Mr Andrews said.
"I think a sense of complacency has crept into us as we let our frustrations get the better of us."
The state had been easing restrictions before the surge in the past fortnight.
It now has hundreds of active cases, while other Australian states and territories continue to report only small numbers of new infections.
What are the new restrictions?
People will be kept to their homes and will only be able to leave for essential reasons, such as for work, exercise and shopping for food and other necessities.
Schools will largely return to distance learning and restaurants will, once again, only be permitted to serve takeaway food.
However, shops and hairdressers will remain open.
The measures were to come into force from Wednesday.
The lockdown covers only Melbourne and an area to the north called the Mitchell shire, but the state as a whole has been sealed off from the neighbouring states of New South Wales and South Australia.
Police and troops will be stationed at border crossings and patrol the vast borders with drones and other aircraft.
Taxing times return for Australia's second city
By Frances Mao, BBC News, Sydney
Two weeks ago, as the cases started to creep up again, some of the fear and unease returned for residents in Melbourne.
Out of caution, people began cancelling interstate trips. Better to wait it out, said my friends who were due to visit.
Surely it wouldn't get so bad again, right? Australia as a whole had been out of lockdown for over a month.
We were so close to eradication - everyone could see the light at the end of the tunnel.
Desperate to maintain that status, officials were also responding quickly to the outbreaks: locking down suburbs, sending in the military, boosting testing.
But for the first time in Australia, community transmission appears to have gained a hold. The case numbers exploded past 100 at the weekend. Then on Tuesday, nearly 200 new cases were confirmed.
The announcement didn't come until afternoon but by then most Melbourne residents knew. Sliding back into lockdown - after having tasted freedom for a few weeks - is a cruel blow.
Friends have been scrambling to do their last family visits and shopping trips.
A second lockdown, arguably, is even more taxing - mentally and financially.
What makes it worse is the city will have to bear it alone. The rest of the country has largely eradicated or slowed the virus.
How did it come to this?
For months Australia had felt optimistic about containing Covid-19, then came the resurgence of the virus in Melbourne.
At the weekend, Melbourne authorities locked down about 3,000 people living in nine housing-estate tower blocks after at least 23 cases of infection were found. Dozens more have been found since.
Residents were told not to leave their homes under any circumstances for five days.
A looser lockdown was placed on about 300,000 city residents, now extended to the whole city.
What concerns the authorities is that local transmission is now the key source of infections.
Previously, most cases came from travellers returning from overseas.
Other Australian states have dramatically slowed or eradicated the virus, but in Victoria private security guards overseeing hotel quarantines reportedly broke the rules.
Mr Andrews described cases of illegal socialising between staff, listing examples of workers sharing a cigarette lighter or car-pooling. Local media also reported claims of sex between guards and quarantined travellers.
The government has ordered a judicial inquiry into the state's quarantine operation and has fired contractors.