Before the advent of social media parents wanting to complain about their school would have had a face to face meeting with the headteacher.

Now families increasingly use sites like Facebook and Twitter to air their grievances, prompting calls for an independent ombudsman to be set up.

Parent body Connect Scotland said one of the reasons why social media was being used increasingly was because families felt existing procedures were a "closed shop".

The call for an ombudsman comes as new figures show complaints from parents to the General Teaching Council for Scotland (GTCS) are also on the increase.

The GTCS said they fielded more than 70 complaints last year compared to just 30 in 2013. However, the vast majority are rejected because parents have not gone through correct local authority procedures - or they are deemed "frivolous".

Eileen Prior, executive director of parent body Connect, said complaints were increasing because procedures were either not clear to parents - or they felt it was a "closed shop".

She said: "They start at the school, and then go on to the local authority, but that feels like an inadequate process because of concerns everyone is closing ranks to protect teaching staff.

"Many parents feel they have nowhere independent to go to to investigate a complaint and an external ombudsman who actually investigate complaints is now required."

Joanna Murphy, chairwoman of the National Parent Forum of Scotland, said procedures were "far from easy" for parents.

She said: "There is no clear route for families to obtain clear, impartial advice. What may seem frivolous or malicious in the eyes of the GTCS or schools may cause significant distress for the parent and child."

Ken Muir, chief executive of the GTCS, said the increasing use of electronic communication and the rise of social media were key factors for the rise in complaints.

But he said many of the referrals to the GTCS were "frivolous" - such as a teacher sending a pupil out of the classroom because they had been cheeky.

He said: "We obviously have a role to look at these referrals to maintain the quality of the teaching profession and we invest a lot of time and resources so the public can have confidence, but 40 per cent of these referrals do not require an investigation."

Mr Muir's main concern is that parents increasingly see the GTCS in the role of an ombudsman and make a complaint without first contacting the school.

He said: "We require due process to have been followed before we would consider a referral and we cannot really address concerns if they have not been in touch with the headteacher or local authority to give them a chance to resolve these issues."

Teaching unions said the rise of frivolous complaints - either through social media or traditional means - caused significant stress to teachers because of the length of time allegations could be hanging over them.

A spokesman for the Educational Institute of Scotland said: "Pernicious and senseless complaints can have serious implications for the wellbeing and mental health of teachers.

"The GTCS has a responsibility to take each complaint seriously, but having such a high percentage of complaints turn out to be spurious is deeply worrying and represents a misuse of its time and resources."

Seamus Searson, general secretary of the Scottish Secondary Teachers' Association, said frivolous complaints had even resulted in some teachers being forced out of the profession.

"The complaints process can be very legalistic and frightening to teachers because they fear they could lose their registration and ultimately their jobs.

"Many teachers who have lived through malicious or frivolous complaints are broken as a consequence and leave soon afterwards. They often feel they cannot trust pupils, parents and sometimes their colleagues again and are lost to the profession."

In 2015 a survey of teachers across the UK found 44 per cent had insulting comments made about them by parents on websites such as Facebook and Twitter.

Of those who had been abused, 11 per cent said allegations of inappropriate behaviour had been made against them, but only 30 per cent reported such incidents because they they felt nothing would be done.

Earlier this year, the Scottish Parliament's education committee heard teachers were leaving the profession because of social media abuse.

Laurence Findlay, corporate director for education at Moray Council, said: "One thing that has become very much a 21st century phenomenon is the notion of a teacher attack on social media where, for whatever reason, a parent or a group of parents take a dislike to a decision a teacher has made."

A report into referrals to the GTCS found 71 complaints from parents last year compared to 52 the previous year.

Complaints from the public ended up at a hearing stage only five per cent of the time because these referrals were almost always closed at an earlier stage "as they do not meet the level of seriousness required to have an impact on a teacher’s registration" or have been "appropriately managed at the employer level".