Alex Salmond has been branded out of "out of control" after Scotland's top civil servant dismissed calls for an inquiry into his conduct during a by-election.

Barney Crockett, the Labour leader of Aberdeen City Council, threatened to make a formal complaint against Sir Peter Housden, the Scottish Government's Permanent Secretary.

Sir Peter refused to entertain calls for a probe into visit during the recent Aberdeen Donside by-election to closure-threatened Bramble Brae Primary.

The First Minister entered the building and addressed youngsters without the headteacher's knowledge.

Replying to a formal request from the council's chief executive, Valerie Watts, the Permanent Secretary said the First Minister had set out the facts and background in a separate letter.

Mr Crockett said he would complain to the head of the Home Civil Service, Sir Bob Kerslake, and claimed the First Minister was no longer being held to account by his politically impartial civil servants.

He said: "It is astonishing that the First Minister finds it acceptable to march into a primary school unannounced to any of the staff or education officials and address a classroom of children. He [Alex Salmond] is out of control."

The council called for an inquiry in the wake of the Aberdeen Donside by-election in June, which the SNP won with a much-reduced majority.

On Wednesday, the First Minister accused the council's ruling Labour and Conservative coalition of bringing the authority into "total disrepute" by criticising his behaviour.

Deputy First Minister Nicola Sturgeon yesterday held clear-the-air talks with the council leader and chief executive. She defended Mr Salmond's comments as "justified" and called for the two organisations to work together.

But Mr Crockett said: "We can work with even the most negative of people if we have to for the future of the city. No matter how intemperate and wild and uncontrolled the First Minister is - he is the First Minister and we have to work with him for as long as he is in post."