The government in Spain's Catalonia region has re-imposed coronavirus controls on an area of 210,000 people after a sharp rise in infections.
President Quim Torra said no-one would be allowed to enter or leave Segrià, an agricultural area west of Barcelona which includes the city of Lleida.
The local lockdown began on Saturday afternoon with provisions made to allow non-residents to leave.
Catalonia is one of the Spanish regions worst affected by coronavirus.
As of Friday, the region had recorded 72,860 confirmed Covid-19 cases and 12,586 deaths, the regional government's news agency reports.
Two more deaths and 400 new cases were reported, with 155 of the new infections detected in Lleida alone.
Overall, Spain has recorded more than a quarter of a million cases and at least 28,385 deaths.
The country has been reopening its borders to other EU states, as well as the UK, in anticipation of summer holiday traffic.
What action is being taken in Segrià?
President Torra took the decision after meeting his ministers and civil defence officials.
"We are taking a step back to protect ourselves and control the outbreak," he said.
Non-residents were given until 12:00 (10:00 GMT) on Saturday to leave and residents were advised not to travel between towns within Segrià.
Image copyright Reuters Image caption Barcelona's famous Sagrada Familia basilica was open on Saturday for key workers and their families to visitAbsent residents were being allowed to return by 16:00, with exceptions to be allowed, for instance, for people returning from work.
The lockdown will be enforced using police checkpoints
Within the area, gatherings will be limited to 10 people, and special measures are being taken to keep people in care homes safe.
A field hospital was set up outside LLeida's Arnau de Vilanova hospital on Friday with capacity to treat up to 105 patients if required.
Sara Canals, a journalist in the region, told BBC News that, according to recent figures, 21 people were being treated in hospitals and six people were in intensive care units.
"Some might consider [this] maybe too drastic," she said, "but there's a willingness here to find a right balance between reopening the economy but also to ensure safety. So the Catalan authorities have decided to lock down the region and see how this new outbreak evolves."
The Spanish region of Aragon, which borders Lleida, re-imposed restrictions on several areas last month after an outbreak among fruit pickers in its Huesca province.
Image copyright Getty Images Image caption A healthcare worker in Catalonia at the height of the coronavirus crisis in April