Education Secretary John Swinney has admitted it was wrong that a drag queen, called Flowjob, addressed primary school pupils about LGBT issues.

Mr Swinney said the artist “quite clearly” should not have been invited to the school and added it was up to SNP MP Mhairi Black to explain why she had defended the visit.

Ms Black, who was present when the drag artist was at Paisley’s Glencoats Primary, caused anger by claiming that parents who were concerned by the event were homophobic.

Mr Swinney distanced himself from his SNP colleague’s views, saying he would “let Mhairi Black explain her view on all of these issues” as other senior SNP figures lined up to criticise the drag queen’s presence in the primary school.

Parents were angered and Renfrewshire Council apologised after it emerged that the artist was brought into the school, despite having posted sexually explicit material on social media.

The drag artist read to young children during the visit, which was held to mark LGBT history month and explore the legacy of Section 28, the legislation that once banned the “promotion of homosexuality” in schools.

Mr Swinney said helping young people to understand LGBT issues was an “important element” of equipping them to understand the modern world as part of the health and well-being curriculum.

“But quite clearly … this was an invitation that should not have been issued given the background material that had been on the social media account of the individual concerned,” he added.

I’ll let Mhairi Black explain her view on all of these issues. That is probably the safest place to leave it.” Education Secretary John Swinney

Mr Swinney said it was “correct” that Renfrewshire Council had apologised following the incident. But he declined to answer the question directly when asked if Ms Black should also say sorry.

“I’ll speak on my behalf and I’ll let Mhairi Black explain her view on all of these issues. That is probably the safest place to leave it,” Mr Swinney said.

Ms Black, MP for Paisley and Renfrewshire South, had defended the visit claiming that if she had been visited by a drag queen when she was at school it would have “made an immeasurable difference to the difficult childhoods my LGBT classmates and I had”.

But her claim that parents “were pretending to be livid” and her accusation that their “homophobia is transparent” caused anger.

You just know that the people pretending to be livid that a drag queen read a book in a school in my mentions rn are also the people who run out to buy their kids the latest Grand Theft Auto on release day. Your homophobia is transparent. — Mhairi Black MP (@MhairiBlack) February 24, 2020

Senior SNP figures including Nicola Sturgeon indicated they were unhappy about Ms Black’s attitude. Ms Sturgeon’s spokesman said: “If schools are involved in LGBT education initiatives then clearly they need to do so in a way that’s appropriate and that has widespread support among parents and the community.”

SNP Paisley MSP George Adam said: “We need to be careful about who goes to schools for events like that – not so much a drag artist but more the type of drag artist.”

On Twitter, SNP MSP James Dornan suggested it would be more appropriate with children to meet with gay role models such as sports stars, teachers or doctors.

I can’t believe anyone thought this a good idea. Surely in LBTQ month it would have been more appropriate to invite a gay sport star, teacher, doctor etc instead of what could be perceived as a stereotype? Just my opinion, which I am still entitled to voice? And that timeline — James Dornan SNP (@glasgowcathcart) February 24, 2020

Meanwhile the SNP’s new head of communications Murray Foote was forced to qualify a tweet in which he compared the drag act’s visit with the pantomime dame tradition.

Mr Foote said: “I could be wrong but do thousands of parents not voluntarily take their primary age kids along to see drag acts in pantomime every Christmas?”

Later, Mr Foote posted another tweet acknowledging “legitimate parental concerns” about the act’s social media posts.

In hindsight this tweet lacked the necessary qualification around some of the legitimate parental concerns about social media posts. I was attempting to make too broad a point. — Murray Foote (@murrayf00te) February 25, 2020

The drag artist said children were introduced to her as “Flow” rather than “Flowjob” and that her act was tailored to the audience’s age.

However, parents expressed their concern that the drag artist had posted a photo of the session with the school pupils on Instagram, alongside other adult-themed posts.

Other parents insisted that they had been given no notice of the drag queen’s visit.