Dozens of Carse residents wrote the the Scottish Government pleading with them to save their closure-threatened school.
Fifty-two representations were received by ministers after councillors at Perth and Kinross council voted in favour of closing Abernyte primary school.
The decision was called in by the Scottish Government, leading the council to request a judicial review.
Lawyers for the Scottish Government made their final submissions in the case at the Court of Session yesterday.
Morag Ross QC, representing the Scottish ministers, said the council may have failed to properly consider the impact of the closure on the community.
And she said in seeking representations from the public the Scottish Government had acted correctly.
She said: “There appears to be significant distance between the local community and the local authority on the effect the closure of Abernyte will have. The impact on the community is seen in the strong thread running through the representations.
“To try and sift out those representations which are unfounded is the job of the (school closure review) panel.
“If this had been referred to them they would have made their decision by November.”
She added that although the council said the decision to close Abernyte was based on falling pupil numbers and not financial considerations, the potential savings may have had a bearing on the decision made by elected members.
Ms Ross asked the court to throw out Perth and Kinross Council’s application to have the call-in process suspended.
Lady Wise has now retired to consider the petition and a decision is expected in the coming months.
Local councillor Alasdair Bailey said the community needed certainty over where their children are to be educated after the summer holidays.
He said: “Alongside the community in Abernyte, I eagerly await the outcome of the current court action in order that we can get certainty over which school the children will be educated at come August this year (the current scheduled close date).
“If the court rules in the Scottish Government’s favour and the review panel are to resume their work then I’d hope that the council can delay the proposed closure date to summer 2021 in order that everyone has enough notice for the transition to Inchture Primary if the closure is upheld by the panel.”