Dumfries and Galloway Council is to seek legal advice after its plans to close a rural school were rejected by the Scottish Executive.
The council is considering legal moves over the school decision
The education authority wanted to close Glentrool Primary where it said pupil numbers were set to fall to four.
Education Secretary Fiona Hyslop refused to sanction the move.
Director of Education Fraser Sanderson said retaining the school was not in pupils' best interests and is studying whether legal action is possible.
The council had agreed to close the school earlier this year but because the closest alternative primary was more than five miles away it had to seek ministerial approval.
That has not been given and Mr Sanderson said it left the council with a serious headache.
"I am bemused by it all, we are talking about a school of four pupils," said Mr Sanderson.
"We now have one arm of the Scottish Executive advising us that we should reduce our school estate because of falling numbers.
"But on the other hand we have ministers refusing to accept a council decision to close a school of four pupils.
"It puts our whole school review process in tatters."
South of Scotland SNP MSP Alasdair Morgan said he believed the proposals to close the school were considered to be "short-sighted".
He said the council would have to look at ways to allow the community to support a school.