A German court has banned a German comic from repeating parts of an obscene poem he wrote about Turkish President Recep Tayyip Erdogan.
The court in Hamburg ruled that Jan Boehmermann's poem was satire, but said the sexual references were unacceptable.
However the comments on President Erdogan's treatment of freedom of speech were allowed, it said.
Mr Boehmermann's lawyer said the ruling went against "artistic freedom".
"We believe that the court's decision in its concrete form is wrong, given that it deems those parts dealing with Erdogan's approach to freedom of expression to be acceptable," said Christian Schertz.
Mr Boehmermann himself responded by tweeting a link to the Beastie Boys song "(You Gotta) Fight for Your Right (To Party)".
The Turkish president had filed a criminal complaint against the satirist in a case that prompted a debate in Germany over freedom of speech.
Mr Boehmermann, considered Germany's most incisive satirist, had read the obscene poem on his Neo Magazin Royale programme on 31 March, making clear that it included material that broke German laws on free speech. Section 103 of the criminal code bans insulting representatives or organs belonging to foreign states.
In particular, the poem made references to sex with goats and sheep, as well as repression of Turkish minorities.
Last week it was read out in full in the German parliament by an MP during a debate over proposals to abolish the law against insulting foreign leaders.
A satirist's step too far? By Damien McGuinness, BBC News, Berlin
To some the poem was puerile, vulgar and irresponsible at a time when Europe needs Turkish help in the refugee crisis.
To others it was an ingenious work of subversive art, which highlighted the importance of freedom of speech - a sketch in which even President Erdogan is now playing his part.
Either way, Jan Boehmermann always goes a step further than polite society generally allows. Clever, funny and complicated, he has singlehandedly revolutionised German state broadcasting.
During the height of tensions between Athens and Berlin over the Greek debt crisis, Boehmermann portrayed Greek Finance Minister Yanis Varoufakis as a vengeful motorbike-riding sex bomb. But it was his fellow Germans, and the rest of the media establishment, that the comedian was mocking.
A jaunty 1930's-style Springtime for Hitler remake wittily highlighted the similarities between the views of the anti-migrant party AfD and Nazi-era politics.
Even refugee helpers have been fair game, as Boehmermann mercilessly portrayed modern, multi-cultural Germans as a self-righteous unstoppable horde of muesli-eating, Birkenstock-wearing sexual perverts.
But for Boehmermann's many fans the fear is now that taking on Turkey's president has been a step too far.