The county borough of Caerphilly is to be placed under a local lockdown from 18:00 BST on Tuesday after a “rapid” rise in coronavirus cases.
No-one will be able to leave or enter the borough without good reason, the Welsh Government said.
Face masks will be required for everyone over 11 in shops within the area.
People will not be able to meet indoors with others in their extended household, nor make overnight stays.
The Welsh Government said that at 55.4 cases per 100,000 population, Caerphilly county had the highest rate in Wales and one of the highest in the UK.
It is the first local restriction announced in Wales since the start of the pandemic.
Schools, bars and restaurants are not being closed under the restrictions. Care visits will be able to go ahead.
Wales’ Health Minister Vaughan Gething blamed the rise in cases on people socialising in their homes.
The changes mean people cannot enter or leave Caerphilly county borough – which includes Caerphilly town, Ystrad Mynach, Blackwood, Newbridge and Risca – without a “reasonable excuse”.
That includes work, if people are unable to work from home, or making a compassionate visit to a loved one, or to give care.
Mr Gething said there had been a “significant rise in cases” in the borough over a short space of time, linked to travel abroad and people socialising indoors “not following social distancing guidelines”.
“A lot of these cases are in younger people and thankfully, at the moment, most of these are mild.”
Coronavirus cases in Caerphilly
New positive tests by day
Mr Gething told BBC Wales: “Social distancing had broken down in large parts.
“There’s been a sustained rise in cases and we’ve been able to trace that back to activity that has largely taken place in people’s homes.”
He said he knew people would be disappointed but the Welsh Government had to act after “the sustained rise in cases”.
Mr Gething said there had not been an increase in the number of people seeking medical attention but he said “it would take two or three weeks to see that sort of impact”.
Caerphilly council leader Philippa Marsden said: “We need to create a break in the cycle of infection we are seeing in Caerphilly borough at the moment and unfortunately that means introducing new, tougher restrictions.”
What are the new restrictions in Caerphilly?
- People will only be able to meet others outdoors for the time being as indoor meetings and gatherings will be restricted
- People will not be allowed to enter or leave the Caerphilly area without a reasonable excuse, such as care visits or to go to work if they are unable to work from home
- Everyone over 11 will be required to wear face coverings in shops
- Caerphilly council has already temporarily suspended visiting to care homes
- Source: Welsh Government
More detail on what is considered a reasonable excuse for leaving or entering the area is expected on Tuesday.
The new restrictions will apply to everyone living within the Caerphilly council area.
The rules will be kept under review and enforced by the council and police, the Welsh Government said.
Caerphilly county has had more new cases in the past week than anywhere else in Wales.
The number of cases on Friday – 31 – was the highest in the county for a single day since the pandemic began.
Caerphilly is still outside the highest case rates in the UK, which is topped by Bolton (116 per 100,000 at the most recent count) and includes Manchester and Tameside (both 50 cases per 100,000).
Community testing started in Caerphilly county borough at the weekend. A total of 450 people were tested and 19 were found positive.
The positivity rate of 4% indicated that the virus was circulating in the community, the Welsh Government said.
Welsh Conservative health spokesman Andrew RT Davies said he was disappointed a local lockdown had become necessary.
“Critically, any such local lockdown must be for as short a time as possible,” he said.
Plaid Cymru South Wales East MS Delyth Jewell said: “As cases rise across Wales the Welsh Government must now make face coverings mandatory in shops across the country.
“All efforts must go into protecting our communities and preventing a second wave – and a second lockdown.”