Father Ted writer Graham Linehan has appeared at a comedy show outside the Scottish Parliament, after it was cancelled twice by Edinburgh venues.
Comedy Unleashed moved the gig to Holyrood on Thursday when a second venue declined to host the show.
The original venue, Leith Arches, had pulled out amid concern about Mr Linehan’s views on transgender issues.
Mr Linehan has threatened legal action if the venue refuses to reverse its decision and apologise.
The cancellation of the show had sparked a wider debate on freedom of speech.
A small temporary stage was erected near the main entrance to the Holyrood building, where Mr Linehan appeared as part of the bill. Around 100 people were in the audience.
His appearance in the comedy showcase was initially kept under wraps with organisers only describing him as a “surprise famous cancelled comedian” on the bill.
But the venue called off the entire show within hours of his identity being confirmed on Tuesday, saying they had not been made aware of the line-up in advance.
“We have made the decision to cancel this show as we are an inclusive venue and this does not align with our overall values,” they said in a post on Instagram.
“We work very closely with the LGBT+ community, it is a considerable part of our revenue, we believe hosting this one off show would have a negative effect on future bookings,” they later added.
Mr Linehan is often at the centre of heated rows over trans issues and women’s rights on social media, with opponents accusing him of transphobia.
In a BBC Newsnight interview in 2020 he compared the medical treatment of transgender teenagers with puberty blockers to Nazi human experimentation.
He told TalkTV on Wednesday: “The most important view I have is that it is a crime against humanity to tell children they may have been born in the wrong body.”
SNP MP Joanna Cherry, who was at the centre of a free speech row earlier this year, said the efforts to cancel Mr Linehan’s show was a pattern of “all-too familiar discrimination against people… who don’t subscribe to gender identity ideology.”
“That is Graham holds a view like me that a man can’t become a woman and someone’s gender identity, somebody’s feelings about their gender should not trump the realist of the sex that they are born into,” she told BBC Radio Scotland’s Drivetime.
Ms Cherry added: “It’s astonishing that a comedy night in Edinburgh, during the largest arts festival in the world, should be prevented from going ahead simply because some people are offended by the views of the comedian and how he expresses himself.
“Free speech is freedom from consequences so long as the speech does not break the law and it’s not against the law to be offensive or to say things which other people don’t agree with.”
Mr Linehan co-created the Channel 4 comedy Father Ted and later wrote Black Books and the Emmy-award winning The IT Crowd.
A 2008 episode of The IT Crowd which involved a transgender storyline was pulled from Chanel 4’s streaming service in 2020.
He was suspended from Twitter shortly afterwards, with the social media giant claiming he breached rules on “hateful content”.
In an emotional BBC interview last year, the Dublin-born writer told Nolan Live he had been unfairly targeted over his views, losing him work and contributing to the break-up of his marriage.