Scotland’s pupils are set to begin a phased return to school after the February holidays.
Primaries one, two and three are scheduled to be back in class from February 22, the First Minister Nicola Sturgeon said.
Nursery children are also set to go back on that date, along with some senior pupils facing assessments.
However, Sturgeon said the phased return would be subject to a review on February 16 and was dependent on coronavirus cases continuing to fall.
Almost all pupils have been learning at home since the Christmas holidays under the lockdown restrictions.
Other rules, such as the stay at home law, will remain in place until at least the end of February, although Sturgeon said they could begin to ease in March.
Only the children of key workers have been able to go to school, while this year’s exams have been cancelled for older pupils.
Anyone working in schools or childcare settings in Scotland, as well as older pupils, will be routinely tested twice a week, Sturgeon said.
Addressing MSPs in Holyrood, the First Minister announced a phased return to schools which would be supported by an expansion of the testing regime.
She said: “It is our intention that those who work in schools, and in early learning and childcare settings attached to schools, will be offered at-home testing twice a week. All senior-phase secondary school students will be offered this too.
“This testing offer will be in place for schools as soon as possible to support their return, and we will extend it to the wider childcare sector in the weeks after that.
“We are determined to get our children back to normal schooling just as quickly as it is safe to do so. It is our overriding priority.”
Parents group UsForThem Scotland welcomed the return for younger children, but said families of older pupils had been left “devastated”.
Organiser Jo Bisset said: “We’re glad the government has finally acknowledged the damage caused to young children by school and nursery closures.
“For parents of younger kids, the announcement represents a long-awaited piece of good news.
“However, this unbearable limbo for thousands of others looks set to continue now for months, and that is devastating for families.”
Union leaders said councils and the Scottish Government had to ensure schools were safe for teachers, children and other staff.
Lorraine Thomson, chair of Unison Scotland education issues group, said: “Employers must ensure that risk assessments are taking place, that staff are aware of these assessments and are trained so that they can work safely.
“Proper implementation of appropriate mitigations is the only way to keep staff, children and the wider community safe. “