Hundreds of children have been excluded for attacking pupils and teachers with weapons in Scottish schools, it has emerged.

Around 700 pupils have been forced to leave primaries and secondaries for carrying out armed assaults over the last five years, according to information obtained by STV News.

The figures, provided by all 32 Scottish councils, come as an independent inquiry into the killing of schoolboy Bailey Gwynne prepares to reveal its findings.

The 16-year-old was fatally stabbed at Cults Academy in Aberdeen last October by another pupil, who said he had brought the knife to class in an attempt to be "cool".

Knife crime campaigner Lisa McLean said: "Children bring knives into schools because they think it's cool and it goes across both primaries and secondaries.

"The situation gets played down but it's happening every day."

The figures show 688 children were excluded for armed assaults between 2011/12 and 2015/16 which included attacks with weapons like knives, but not assaults with everyday items like pencils or rulers.

Glasgow City Council recorded the highest number of exclusions with 128, North Lanarkshire reported 89, and Edinburgh City Council registered a total of 85. Fife Council had the fourth highest number at 74 and Aberdeenshire reported 60.

Education Institute of Scotland general secretary Larry Flanagan said: "It's a significant figure and clearly there will be concerns around that level of violent assaults in our schools.

"Generally schools are safe and secure environments for both pupils and staff, but clearly that figure and the statistics behind it indicate that there is an issue to addressed."

However, Mr Flanagan cautioned against the introduction of increased security in Scottish schools.

Exclusions for attacks with weapons make up less than 1% of all exclusions in Scotland each year and halved from 167 in 2011/12 to 83 in 2015/16.

Police were not told about every incident which led to an exclusion - Glasgow City Council only reported two assaults - and the force does not produce its own figures.

Reasons for exclusions were also widely misreported in official statistics due to confusion over the difference between an improvised weapon (like a ruler or compass) and a weapon (like a knife or BB gun).

More than half of Scottish councils revised their figures when approached by STV News.

A Police Scotland spokesman said: "Reports of weapon-related crimes in schools are unusual but all such reports are a matter of concern and when such reports are received they are fully investigated.

"Police Scotland is working with partners including local authorities and the Violence Reduction Unit to educate, prevent and change attitudes towards the carrying of weapons of any sort."

Annabelle Ewing, the Scottish Government's minister for community safety and legal affairs, added: "The overwhelming majority of school pupils are well behaved, but having a weapon at school is absolutely unacceptable and that's why we're investing in programmes and working with local authorities to educate young people."