AN SNP MSP has come to the defence of a primary school after it faced criticism for asking pupils to fill out a survey which included questions about gender and sexuality.

Emma Roddick MSP said that the survey issued at Merkinch Primary in Inverness – which asked pupils whether they identified as gay or transgender – would help open up conversations and “allow space for acceptance” of children and parents who are LGBT+.

A photograph of the survey was posted onto social media by Scottish Family Party member Niall Fraser, who claimed that Scottish schools were acting as “rainbow indoctrination camps”.

He told his followers to direct any complaints about the survey to veteran SNP MSP Fergus Ewing as the school lies within his constituency.

But Roddick defended the actions of the school and denounced the online abuse the school had received in the wake of the survey.

Speaking to the Inverness Courier, she said: “The primary school has my full backing in looking out for its pupils.

"I understand its survey asked if children would make fun of others for having two mums or dads, a situation it's likely many are in.

"It's right that the school knows if homophobia is causing anyone distress.

READ MORE: Douglas Ross attempts to deflect blame for Tory chaos in new year plea

"Bairns understand and notice a lot more of what goes on around them than many folk give them credit for, and with better visibility and acceptance of queer identities, it's right that they are given the space to understand their part in continuing that acceptance.

"They might have two mums, or a friend with two dads, and, by late primary school, may very well know more about themselves than their parents did at the same age.”

She added that children should be taught that discrimination against people because of their sexuality or gender identity has no place in Scotland.

"Unfortunately, hate crime towards those in the LGBTQI community is on the rise, and intolerance is a learned behaviour,” she added.

"If kids recognise early on that it's OK for them and their families to be who they are, and that it's wrong to make someone else feel bad for who they are, that can only be a good thing for the future."

A spokesperson for Highland Council has responded to criticism of the survey, stating that it was intended give staff insight into the wellbeing of students.

They said: “The purpose of the voluntary and anonymous pupil survey was to collect insights on pupil wellbeing which will help to inform the wider school improvement plan.

READ MORE: Two sisters and dad who died in Perth hotel fire named by police

"Participating pupils from Primary 1 to 4 took the survey home to complete with an adult and Primary 5 to 7 pupils were able to complete independently in school.

"Responses were recorded as tick boxes but for some questions participants had the option to share any additional information if they chose to do so.

"The school engaged with parents and carers to collect their feedback and shared the anonymised results at a parents’ evening for discussion.”

Between 1988 and 2000, Section 28 – or Clause 2A as it was known in Scotland – prevented teachers from “intentionally promoting” homosexuality in schools.

The Conservative Party has since apologised for the legislation, which was abolished in Scotland in 2000 and the rest of the UK in 2003.

In 2009, former party leader David Cameron said that the law had been a “mistake” and “offensive to gay people”.