An obscene poem by a German TV comedian about Turkish President Recep Tayyip Erdogan has sparked a diplomatic crisis between the two countries.

The text, which makes crude sexual references about Turkey's leader, was intended to highlight the issue of insulting Mr Erdogan, a charge which has been repeatedly levelled in Turkey. To some the poem was puerile, vulgar and irresponsible at a time when Europe needs Turkish help in the refugee crisis.

Mr Erdogan has filed a legal complaint and the comedian, Jan Boehmermann, could now be prosecuted under German law for insulting a foreign head of state, as Mark Lowen in Istanbul and Damien McGuinness in Berlin explain.