* Tehran angered by anti-Iran protests in Baku
* Protests were against "gay" Eurovision comments from Iran
* Already tense relations between neighbours worsen
By Margarita Antidze
BAKU, May 22 (Reuters) - Iran has withdrawn its ambassador from Azerbaijan after clerics criticised Baku's hosting of the Eurovision Song Contest, further souring relations between the Islamic Republic and its secular neighbour.
Iran's withdrawal of its ambassador, for consultations in Tehran, comes after months of accusations by the two countries of meddling in each other's affairs and as the western-allied, mostly Shi'ite Muslim Azerbaijan is about to host a hugely popular international talent show.
Azerbaijan's hosting of the Eurovision Song Contest - a flamboyant annual pageant of pop music from around Europe - has been condemned by some Iranian clerics and lawmakers who have referred to a "gay parade" - although no such event is planned.
A senior Iranian cleric, Ayatollah Sobhani, issued a statement urging Muslims in the region to protest what he described as anti-Islamic behaviour by Azerbaijan's government.
"We heard that the government of Azerbaijan is hosting the international Eurovision Song Contest and that during this contest there will also be a gay parade," the semi-official Fars news agency quoted the cleric as saying.
Iran was angered by subsequent anti-Iranian protests in the Azerbaijan capital Baku, where demonstrators carried pictures of President Mahmoud Ahmadinejad and Supreme Leader Ayatollah Ali Khamenei and banners that read "Azerbaijan does not need clerics-homosexuals!"
The latest spat between the countries that share a religion but have sharply different political systems is part of wider diplomatic tensions.
Iran has accused Azerbaijan of assisting Israel in what it says was the Jewish state's assassination of Iranian nuclear scientists.
Azerbaijan, for its part, arrested dozens of people this year on suspicion of links with Iran's Revolutionary Guards and of plotting attacks on targets that included the Israeli ambassador.
Azerbaijan won the right to host the contest by winning last year's event in Germany, and sees the annual event watched by millions of television viewers as a chance to showcase the country. The final is scheduled for Saturday.
"I do not know who got this idea into their heads in Iran," said Ali Hasanov, head of the public and political issues department in Azeri President Ilham Aliyev's administration.
"We are hosting a song contest, not a gay parade."
The song contest has cast a spotlight on Azerbaijan's human rights record and exposed tension over religion. Azeri officials in private blame Iran for Islam's growing influence in the officially secular country.
Hackers calling themselves Cyberwarriors for Freedom attacked official websites of the contest on Thursday and posted an Azeri-language message demanding Azerbaijan "stop carrying out Eurovision 2012 in Baku and not allow gay parades".
Residents of Baku last week found in their mailboxes leaflets and a video disc condemning the contest and what the materials called a gay pride march.
The videos tell the stories of Muslim martyrs, accuse the government of closing mosques and informally banning head scarves in schools, and warn of natural disasters. (Reporting by Margarita Antidze; Editing by Steve Gutterman and Robin Pomeroy)