Peter Jackson has offered a defence to a man facing jail time for comparing Turkey's president to Lord of the Rings character Gollum.

A Turkish court has asked experts to determine whether Gollum is good or evil to decide whether physician Bilgin Ciftci insulted President Tayyip Erdogan, the defendant's lawyer told Reuters on Wednesday.

Smeagol is a "joyful, sweet character" unlike the "evil, conniving or malicious" Gollum Peter Jackson says.

Erdogan's lawyers are suing Ciftci after he shared pictures on social media of the president juxtaposed with those of the "small, slimy creature" immortalised in JRR Tolkien's fantasy novels.

In Turkey, insulting the president is a crime punishable by up to four years in jail.