All schools in Wales will close by Friday at the latest in response to the coronavirus outbreak, the Welsh Government has announced.
The country's Education Minister Kirsty Williams said she was bringing forward the Easter break.
All school exams this summer have been cancelled, she confirmed.
It comes as England and Scotland took similar steps with all schools and nurseries closing from the end of the week and may not reopen before summer.
The total number of confirmed cases of coronavirus in Wales has reached 149, although the figure is likely to be higher.
"Today's decision will help ensure an orderly closure, so schools have time to prepare," said Ms Williams.
"Children will be off for four weeks but I have to be clear with parents, I am not anticipating we will be able to get schools back to normal at the end of the Easter break [or] for a considerable period of time."
Ms Williams also said this summer's exams would not go ahead, with GCSE (year 11) and A-level (year 13) students to be graded on the work already completed.
"We recognise there are no easy choices but we have agreed that the best way forward is not to proceed with summer exam series," she said.
"Learners due to sit their GCSEs and A-levels this summer will be awarded a fair grade to recognise their work, drawing on the range of information that is available."
The performance of individual schools will also not be measured by the results.
'Fairness for learners'
Regulatory body Qualifications Wales welcomed the decision to cancel exams and said it gave "clarity" to pupils, parents and teachers during an "unprecedented" situation.
"In this extreme circumstance with widespread global disruption, there is no ideal scenario for exams which, by nature, run as carefully controlled events," it said in a statement.
"Our priority is ensuring fairness for learners while following public health advice."
Childcare centres are expected to remain open until advice is given to close.
The Welsh Government spokesperson said some schools would be "repurposed" and remain open for vulnerable children and the children of keyworkers dealing with the response to the outbreak.
"We will continue to ensure the Welsh NHS has the resources it needs to deal with the coronavirus outbreak," said a spokesperson.
Headteachers body NAHT Cymru welcomed the announcement, while Eithne Hughes, director of the Association of School and College Leaders (ASCL) Cymru, said it was "the right decision at the right time".
What do parents think?
Parents have broadly agreed with the decision but said they faced a "challenging" time.
One parent, an IT manager who has children at Ysgol Melin Gruffydd in Cardiff, said both him and his wife - a hospital ward sister - worked full time.
"Work is very accommodating but that's challenging with four small children," he said.
"There are online courses [the children] can do but they'll lose that social interaction."
Another parent added: "It's the right decision but it will have a huge impact. The difficult thing is we don't know how long it will last."
A 'new purpose' for schools
The announcement was made almost simultaneously as the Scottish Government's decision that schools are expected to shut by the end of the week.
England then followed with a similar closure until further notice,
Education Secretary Gavin Williamson said schools would close except for the children of keyworkers, such as NHS staff, and vulnerable children.
Ms Williams said from next week, schools would have a "new purpose".
"They will help support those most in need, including people involved in the immediate response to the coronavirus outbreak," she added.
"I am working with my colleagues in the cabinet, with government officials and our partners in local government to develop and finalise these plans."
Ms Williams told AMs that she was aware of the "stress and anxiety" the uncertainty had caused young people and teachers.
She said she had discussed the issue with her ministerial counterparts in England and Scotland and "all three of us are grappling with the same issue".
Plaid Cymru's education spokesperson Sian Gwenllian said further clarity was needed, alongside clear guidelines from the education minister on the short-term role of schools.
Conservative shadow education minister Suzy Davies said the worrying question was whether schools would be able to reopen after Easter, adding it looked "unlikely".
"Schools will continue to offer educational and social support to some children, and this is to be welcomed," she added.
EASY STEPS: How to keep safe