A change in the law would be required to protect the government from future defeats in its fight to keep rural schools open, a legal expert has said.
Iain Nisbet, head of education law at Govan Law Centre, said current legislation did not include a legal presumption against the closure of rural schools.
Last week, the government lost an appeal against a previous court ruling that allowed Western Isles Council to go ahead with the closure of Carloway Primary on Lewis and end S1 and S2 provision at Shawbost School.
The government had argued that existing legislation, which requires local authorities to consider additional factors when planning to close rural schools, implied that these schools should be kept open. But the Court of Session ruled that this was not the case.
The ruling ends a lengthy legal battle, which began in 2011 when ministers issued a call-in notice on the proposals and refused to consent to the closures. A judicial review concluded in June last year that the council was entitled to go ahead with the closures.
The plans mean that children from Carloway Primary will be transferred to Shawbost, about four miles away, while those in S1 and S2 at Shawbost will be moved 20 miles to the Nicolson Institute in Stornoway.
Mr Nisbet said that while the Schools Consultation Act strengthened the consultation process and the need to consider the impact of closure on communities, there "was never anything in the legislation that I read as a presumption in a legal sense against the closure of rural schools".
He said that if the government was unhappy with that, it could amend the law. If closing rural schools should be the exception to the rule, he added, "then let's make a rule".
Speaking after last week's appeal, education secretary Michael Russell said he was "disappointed" at the ruling and wished it had been possible to reach agreement with the council to keep the schools open.