Wales will go into a "short, sharp" national lockdown from Friday until 9 November.
People will be told to stay at home and pubs, restaurants, hotels and non-essential shops must shut.
Primary schools will reopen after the half-term break, but only Years 7 and 8 in secondary schools can return at that time under new "firebreak" rules.
Gatherings indoors and outdoors with people not in your household will also be banned.
First Minister Mark Drakeford said the "time-limited firebreak" would be "a short, sharp, shock to turn back the clock, slow down the virus and buy us more time".
Without action the NHS would not be able to cope, Mr Drakeford told a press conference.
But a UK government scheme that will cover 67% of the wages of workers at firms forced to close, due to start on 1 November, will not be brought forward to cover the Welsh lockdown.
Chancellor Rishi Sunak said that was because of "limitations in HMRC delivery timescales", in a letter to the first minister.
Some employees may be able to be re-furloughed, however.
Under the lockdown leisure businesses, community centres, libraries and recycling centres will shut. Places of worship will be closed for normal services, except for funerals and weddings.
The announcement follows rising case numbers in Wales and increasing hospital admissions and replaces the 17 local lockdowns that had been in place.
Figures now stand at 128.2 coronavirus cases per 100,000 people over seven days - there were 4,043 cases recorded between 10 and 16 October.
Also of concern is the proportion of positive tests - just under 12% in Wales and nearly 19% in Cardiff, which also has the highest case rate over the past week, 226.6 cases per 100,000.
Halloween and Bonfire Night gatherings will not be allowed under the restrictions which begin at 18:00 BST on Friday, the start of the half-term holiday.
But there will be an exception for small Remembrance Sunday commemoration services on 8 November.
Non-essential cross border travel in and out of Wales "will have to end" during the firebreak period, Mr Drakeford said.
Universities in Wales will continue to provide "a blend of in-person and online learning".
If students have reading weeks or half-term they will also need to stay at home in their university accommodation, the first minister said.
The Welsh Government has provided a package of almost £300m to support businesses.
What are the rules?
The rules will be similar to the lockdown in March:
- People will have to stay at home except for very limited reasons, such as exercise
- People must work from home where they can
- People must not visit other households or meet other people they do not live with either indoors and outdoors
- All non-food retail will shut, and cafes, restaurants and pubs will close unless they provide delivery or takeaways
- Hotels, hairdressers and beauticians will have to shut
People breaching the rules could be fined, with fixed penalty notices starting at £60.
Adults living alone or single parents will be able to join with one other household from anywhere in Wales for support.
Existing rules on face masks - requiring them to be worn in public places indoors - will stay in place.
The previous lockdown continued for months past its initial three weeks, but Mr Drakeford said the firebreak would end on 9 November.
"I've heard some people say, 'oh, the figures won't be down by the 9 of November, so the period will have to continue' - that is not the test to set," he said.
Why a national lockdown?
Mr Drakeford said a national lockdown was needed "partly because the gap between those parts of Wales where we have not needed local lockdowns, and local lockdown areas have been narrowing".
"We all want to see an end to this pandemic and our lives returned to us. Unfortunately, we do not yet have a vaccine, which will allow us to do that.
"So this is our best chance of regaining control of the virus and avoiding a much-longer - and damaging - national lockdown."
The two weeks will be used "very purposefully", the first minister said, allowing for more staff to be recruited for contact tracing and allow others to "catch up on the huge volume of contacts that have to be contacted and traced" from recent weeks.
He told BBC Wales the speed of the upsurge in cases had "come earlier than the models suggested".
Local restrictions had worked, he said, but added: "We have to go beyond them, not because they have failed, but because they haven't been able to succeed enough.
What have experts said?
The R number is the rate at which the virus is increasing - it currently stands between 1.1 and 1.4.
Without a massive reduction in transmission, the scientific advisory body concludes the impact on the hospitals and intensive care units would be "too high for the NHS to sustain".
What support will there be for businesses?
A new £300m fund for firms affected will open next week.
The Welsh Government said every firm covered by small business rates relief would receive a £1,000 payment.
Small and medium-sized retail, leisure and hospitality firms that have to close will get a one-off payment of up to £5,000.
There will be additional discretionary grants and support for smaller firms that are struggling, the government said.
It added that firms would be able to access the support available under the new UK government Job Support Scheme, which will cover 67% of workers pay at businesses forced to shut, but that does not begin until 1 November.
Mr Sunak, in a letter to Mr Drakeford, said he would be unable to bring the claims date forward for the JSS to 23 October.
He said the previous Job Retention Scheme was in place until 31 October and employees previously furloughed for three weeks can be re-furloughed.
'Unfair' on those caught in gap
Conservative Welsh Secretary Simon Hart said people would lose their jobs "as a result of the first minister's decision" and claimed there had been a discussion with the Treasury "a while ago".
He added: "Asking the Treasury to suddenly bring forward the scheme, the first minister knows full well that wasn't possible - because he was told by the chancellor several days ago.
"That strikes me as being very, very unfair on the people who will be caught by the time gap between the Welsh Government scheme and the Treasury scheme kicking in."
The Welsh Government said ministers had offered to pay the extra costs associated with early access to the Jobs Support Scheme.
A spokesman said it meant firms would "now have to access both the Job Retention Scheme and the Job Support Scheme at different points during the fire-break period".
"It is absolutely crucial the UK government ensures this process is as smooth as possible and that all affected Welsh businesses and employees benefit from these schemes during this difficult time."
What has the reaction been?
The union Association of School and College Leaders (ASCL) Cymru said the Welsh Government's decision that primary school children and secondary school children in Years 7and 8 should return after half-term was "a sensible balance in these circumstances".
A retail lobbyist said she was not aware of "any evidence" that justified the closure of non-essential shops.
"Retailers are now gearing up for the vital festive trading period when a fifth of goods are bought. If shops can't trade in the run-up to Christmas that will be a catastrophe," said Sara Jones of the Welsh Retail Consortium.
Janine Brown, who owns of Crundles gift shop in Swansea, said: "I'm obviously disappointed… I've just ordered all my Christmas stock in and I've got to pay for it this week and we're going to be shut down for another two weeks.
"We're all fed up of it, we're all really upset about it. What do we do as small businesses?"
The British Beer and Pub Association said the firebreak would "destroy many pubs, brewers and their supply chains in the country unless the financial support package is available to all businesses hit by the forced closure of all pubs".
"The financial support package announced today leaves many businesses impacted by this forced closure with no additional help," said chief executive Emma McClarkin.
In August, the Welsh Government launched its 'Coronavirus Control Plan for Wales' outlining a strategy to "avoid returning to a national lockdown".
So, two months later, as we prepare for another lockdown, has that plan and those lines of defence failed?
The first minister talked in his press conference about using the two week firebreak "very purposefully" to strengthen the contact tracing system and accelerating the establishment of field hospitals.
He also said they will be looking at the system of fines. Could we see people receiving fixed penalty notices for not self-isolating? There was no direct answer today.
The speed at which tests are being processed is still a major issue. But most of Wales' tests and most of the problems are in the UK government's lighthouse labs so out of their control.
But Mr Drakeford said it is "quite likely" that one crucial aspect is unlikely to have improved by the end of the firebreak period - the number of Covid-19 cases and hospitalisations.
Regardless, he ruled out an extension beyond 9 November but at the same time he did not rule out another firebreak lockdown in a few months' time.
'We are in an emergency'
Plaid Cymru leader Adam Price said a firebreak was a "last resort" and should only be used in an emergency.
"We are now in an emergency," he said.
"The time the firebreak buys us must be used to build up a resilient test, trace and isolate system in Wales, which means we can prevent being in the position we're currently in."
Paul Davies, Welsh Conservative leader, accused the first minister of "failing to be open and transparent about the evidence".
He added: "The main concern is that this national lockdown is not proportionate.
"The impact on businesses in areas such as Powys, Pembrokeshire and Ceredigion, who have the lowest rate of Covid-19 cases in Wales, will be severe at a time when they are desperately struggling to recover from the pandemic so far this year."