BERLIN — The German comic who prompted an international incident with a satirical poem about President Recep Tayyip Erdogan of Turkey will fight the ruling of a Hamburg court that banned repeating most of the text, his lawyer said on Wednesday.

In a ruling made public late Tuesday, the superior state court in Hamburg said that the comic, Jan Böhmermann, could repeat a few selected lines but not the bulk of the poem, “which, because of its insulting content injuring his honor, Mr. Erdogan does not have to accept.”

Christian Schertz, a lawyer who is representing Mr. Böhmermann, said the comic rejected the partial injunction imposed by the court because it tried to dissect the poem into permitted and forbidden parts and, in that way, suggested that artistic freedom was somehow divisible.

Image Jan Böhmermann. Credit... Mathis Wienand/Getty Images

Mr. Böhmermann will fight the ruling all the way to the federal constitutional court if need be, Mr. Schertz said in a statement and in a phone interview.