The Royal Academy of Arts has apologised to artist Jess de Wahls after her work was withdrawn from its gift shop following accusations of transphobia, saying: “We should have handled this better.”

The academy said in a statement that its decision not to stock her embroidery following complaints made on social media had “betrayed our most important core value – the protection of free speech”.

Textile artist De Wahls, who is originally from Berlin, creates intricate embroideries and, according to her official website, “tackles subjects as wide ranging as feminism, misogyny & fetishism combined with creative textile recycling in her prolific output”.

She did not immediately respond to the apology but reposted it on both her Instagram and Twitter accounts.

Culture Secretary Oliver Dowden tweeted: “Welcome apology from the Royal Academy. Freedom of expression is central to great art and culture and should always be protected.”

In a statement to the PA news agency, the Royal Academy said: “There has been a great deal of debate around the RA’s recent communication about no longer stocking the work of Jess de Wahls in the Royal Academy shop. We have thought long and hard since then about this and the wider issues it raises.

“One thing is clear to us now – we should have handled this better. We have apologised to Jess de Wahls for the way we have treated her and do so again publicly now. We had no right to judge her views on our social media. This betrayed our most important core value – the protection of free speech.

“There was also a failure of communications internally which resulted in Jess de Wahls first hearing via social media that we would no longer stock her product in the RA shop. We will now reopen discussions with her regarding the restocking of her work.

“Plurality of voices, tolerance and free thinking are at the core of what we stand for and seek to protect. These events raise some fundamental issues. Freedom of expression can open up debate, create empathy or respect for difference, it can also at times cause hurt and outrage.”

The academy said the situation had “confirmed to us our commitment to freedom of expression and to addressing complex issues through engagement and debate” and that it would look at its internal processes.

It comes after the artist said earlier this week that she had noticed “a mob” being “mounted against” her on social media following a blog published in 2019.

In her post, De Wahls had said she had “no issue with somebody who feels more comfortable expressing themselves as if they are the other sex (or in whatever way they please for that matter)” but that she could not accept “people’s unsubstantiated assertions that they are in fact the opposite sex to when they were born and deserve to be extended the same rights as if they were born as such”.

The comments led to accusations of transphobia, which the artist denied.

Her embroidery work was removed from the Royal Academy gift shop, with the artist saying she was contacted by officials from the academy, who told her they were investigating, and she had responded.

The Royal Academy had posted a message on its Instagram stories saying: “Thank you to all those for bringing an item in the RA shop by an artist expressing transphobic views to our attention.”

However, De Wahls said she wanted an apology from the academy and that she stood by everything she had written.

Earlier this week, she told BBC Radio 4: “They contacted me the day after they posted it on social media. There was no point to that conversation… I don’t know what they were looking for.”