A Carmarthenshire primary school is being told it must stay open at the cost of up to £110,000 - despite not having a single pupil.
Capel Iwan school near Newcastle Emlyn said goodbye to its last 12 children in July.
But education officials say the school must be ready to open in the autumn - with a fully paid head teacher.
The assembly government says the local authority must go through the correct procedures before it can be shut.
Those processes includes a lengthy statutory consultation period with people in the area, before the issue can be fully discussed by Carmarthenshire council.
If there are any objections, then the whole matter must be passed to the assembly government's education minister to consider.
The whole process could take more than a year to complete.
In the meantime, it would be illegal for the school to shut - even though not a single pupil will be taught in the classrooms at Capel Iwan.
Councillor Gwynne Woolridge, who is responsible for education on the executive of Carmarthenshire council, described the situation as "unfortunate".
He said: "Legally, the Welsh Assembly [Government] requires a statutory process of discussion with the governors, with the community, with the parents and with the teachers, and this is the situation that prevails.
"When situations like this arise, it is very difficult. It does cost us money and you have just got to carry on with the consultation process and keep the school open until that process is finished.
"This is the legal situation and we have to work within the law."
As well as retaining its head teacher, Capel Iwan will still be paying for a school caretaker and also has a full governing body.
Carmarthenshire council said it had set aside a budget of £110,000 for the school, on the basis that it would officially remain open until at least the end of March 2011.
The council said that the head teacher would remain employed by the school until the end of December, however the head teacher would be deployed to other duties within the authority during that time.
Chairman of the governors, Mark Vincent said the current situation has arisen because the school only learned at the end of the last term that five pupils who were due to return were being sent to other schools in the area.
The other children who were pupils in July are now due to start secondary school.
"Parents have looked at the number of children in their particular child's age group and thought maybe their individual child's education would be better served in another school," he said.
"Every parent has made their decision based on individual circumstances.
"We didn't have final confirmation that parents were going to do this until days before the end of term."
Mr Vincent said as governors, they would not be objecting to the school's closure.
"From the point of view of the governing body our main concerns were educational, and if you've got no children to educate it's a fait accompli. We won't object to proposals when consultation comes about," he said.
A spokesperson for the assembly government confirmed that the Carmarthenshire education authority must keep the school open.
"If a local authority wants to close a school they must follow statutory procedures," said the spokesperson.
"We have advised the local authority that they need to take this step in respect of Capel Iwan although there are no pupils in attendance. The closure of the school without such procedures would be unlawful."