The celebrity chef posted a message of support to the nine year-old after she was banned from posting pictures on her school blog.

Despite the backlash the council have refused to backdown, insisting "wholly refutes the unwarranted attacks on its schools catering service which... which have led catering staff to fear for their job".

"The information presented in it misrepresented the options and choices available to pupils however this escalation means we had to act to protect staff from the distress and harm it was causing."

Earlier Oliver posted on Twitter: "Stay strong Martha, RT this to show your support #neverseconds. Jx", before posting a link to her blog.

Despite the blog’s huge success and the “brilliant” support from her unnamed school, Argyll and Bute Council bureaucrats made the decision after the negative publicity.

Officials have previously defended the meals insisting they were “fully compliant with nationally agreed nutritional standards”. They attacked the family for fuelling the bad publicity.

The decision has left the schoolgirl, from Lochgilphead, Argyll, devastated and her 39 year-old father, Dave, angry at the “unfortunate” decision, which will prevent her from continuing the blog.

Nick Nairn, the celebrity chef, also voiced criticism of the ban, saying it was "incredibly short-sighted" to punish a do-gooder and the decision reminded him of something that would happen in Communist China.

It has also drawn dozens of outraged responses from people who have followed her exploits from the school canteen in the school in Western Scotland.

Such was the explosion of criticism of the council, it quickly started "trending" on Twitter, meaning it was among the most talked about topics on the micro-blogging site.

By mid morning it was top "trending" item in Britain and the third most popular world-wide. People urged the council to overturn its decision as they launched petitions calling for the ban to be lifted.

Among those tweeting on the ban was Mike Russell, the Scottish Education Minister, who said the decision was "daft" and he would be asking the council's chief executive to overturn it.

In a post published on the blog on Thursday, Martha, who goes by the name “Veg, wrote: “This morning in maths I got taken out of class by my head teacher and taken to her office.

“I was told that I could not take any more photos of my school dinners because of a headline in a newspaper today.

“I only write my blog not newspapers and I am sad I am no longer allowed to take photos.”

Under the headline "goodbye", she added: “I will miss sharing and rating my school dinners and I’ll miss seeing the dinners you send me too.

“I don’t think I will be able to finish raising enough money for a kitchen for Mary’s Meals either.”

Her father, a smallholding farmer, said Martha’s school, which he has repeatedly declined to name, had been supportive but he was critical of the reaction of Argyll and Bute council.

He wrote on the blog: "Martha’s school have been brilliant and supportive from the beginning and I’d like to thank them all.

“I contacted Argyll and Bute Council when Martha told me what happened at school today and they told me it was their decision to ban Martha’s photography.

“It is a shame that a blog that today went through 2 million hits, which has inspired debates at home and abroad and raised nearly £2000 for charity, is forced to end."

On Friday he added: “We did not expect it to be so popular. The numbers are staggering, we don’t understand how it happened.

“The council made the decision above the school.”

Speaking on BBC Radio Scotland, Mr Payne agreed the ban was an “own goal” by the council that will only serve to generate more criticism because "the pictures tell the story about how good the food is.”

"She is not happy about it. As a parent, when you tell a child off or you ask them to stop doing something you need to give them a good reason and a good explanation and I’m not sure that’s been done in this case,” he said.

“I can see that the photographs at the start didn’t look the most appetising but Martha marked her last school meal 10 out of 10. I understand it brought pressure from around the world and media interest."

“I think it is making a difference on many levels. Children are engaging about food. They are very used to adults saying ‘you should be eating this’, but when it’s a child leading a change of attitudes that’s powerful."

But he said: "Martha has done a fantastic job. All the way through this she has been incredibly fair and now she's been punished for something that she had no hand in whatsoever and that makes me cross.

"I have no idea what process the council went through, but it just seems to me incredibly short-sighted to penalise a girl who's actually been a force for good and a force for change by slapping her down and silencing her. If that had happened in China, we would be up in arms about it."

Ian Rankin, the best-selling crime author, tweeted to Argyll and Bute Council: "I spent yesterday trying to enthuse school pupils about creativity and the written word. So thanks a lot."

Martha, who has ambitions on becoming a journalist, started posted the series of pictures as part of a school writing project she started with her father.

Because her home is on the west coast of Scotland, standards for school meals are different and improvements throughout Britain appear not to have been applied to her unidentified school.

With permission from teachers, she photographed her £2 school lunches and wrote about them, posting pictures online every day and added a rating under her “Food-o-meter”.

Her first picture was a slice of pizza and a single potato croquette, alongside some sweetcorn and a cupcake for desert.

While some of her posts were critical, Martha, whose mother Rebecca is a GP, also praised her meals, rating one “10/10”.

In recent weeks she started posting pictures of meals sent in by readers from America, Germany, Spain Finland and Japan.

She has also started a fund-raising campaign for the Scottish charity Mary's Meals, which feeds children in schools in the Third World.

After seeing the photographs of the meals, Oliver, the school food campaigner, sent a tweet to her father, which read: "Shocking but inspirational blog. Keep going. Big love from Jamie x."

Martha later posted that the celebrity chef had sent her a copy of his “Jamie's Great Britain” cookbook in which he wrote: “Dear Martha, great work!!! Clever girl. Lots of love. Jamie O. XXX Keep it up!!”

In a lengthy statement, which was almost 600 words long, the council wrote: "Argyll and Bute Council wholly refutes the unwarranted attacks on its schools catering service which culminated in national press headlines which have led catering staff to fear for their jobs.

"The Council has directly avoided any criticism of anyone involved in the ‘never seconds’ blog for obvious reasons despite a strongly held view that the information presented in it misrepresented the options and choices available to pupils however this escalation means we had to act to protect staff from the distress and harm it was causing.

"In particular, the photographic images uploaded appear to only represent a fraction of the choices available to pupils, so a decision has been made by the Council to stop photos being taken in the school canteen."

What are your school lunch memories? Have your children photographed their meals? Let us know: mynews@telegraph.co.uk.