A Moray school which has just two pupils on its current roll will stay open despite local authority attempts to close it.
Moray Council had planned to close Cabrach Primary School
Moray Council proposed that the children at Cabrach Primary be transferred to another school.
However, the Scottish Government has ruled that the school should stay open.
Moray Council education heads had questioned whether the high costs - £50,000 a year per child - were fair to other schools and children.
The children would have been expected to travel to Dufftown several miles away when the new school term began.
Alistair Farquhar, director of educational resources for Moray Council, said: "Moray Council took the view that the closure of Cabrach was the best option.
"Nevertheless, we will continue to support the small Cabrach community and the school."