By Daren Butler and Ayla Jean Yackley

ISTANBUL (Reuters) - Turkey is determined to take part in a planned operation by coalition forces to oust Islamic State from the Iraqi city of Mosul and will implement a "plan B" if it is not involved, President Tayyip Erdogan said on Friday.

In a speech in the city of Konya, Erdogan said Turkey would make its desire to take part in the operation known to its international partners in the coming days. He did not offer details on what an alternative strategy would entail.

Ankara has been locked in a fierce row with Baghdad over who should take part in the U.S.-backed assault on Mosul, which is expected to begin this month.

Turkey fears the use of Shi'ite militias, which the Iraqi army has relied on in the past, will stoke sectarian unrest and trigger an exodus of refugees.

"We will convey our request to coalition forces that we are determined to take our place in a coalition in Iraq. If they don’t want us, our Plan B will come into effect. If Turkey isn’t safe, nobody in the region is safe," Erdogan said.

Turkish soldiers have been training Sunni Muslim and allied Kurdish peshmerga units at Iraq's Bashiqa camp, near Mosul, and want them involved in the assault. Baghdad objects to the Turkish military presence in northern Iraq.

Iraqi Prime Minister Haider al-Abadi has said Turkey risks triggering a regional war. His government has requested an emergency United Nations Security Council meeting to discuss the issue, and both countries have summoned each other's ambassadors in a mounting diplomatic stand-off.

"You called us to Bashiqa, and now you are telling us to leave. Excuse me, but I have kin there, I have Turkmen brothers there, Turkish brothers who ask us to come and help," Erdogan said. "Excuse me, but I won’t leave."

REFUGEE FEARS

Turkey's state-run Anadolu agency earlier said that Turkish-trained forces from Bashiqa would be involved in the planned Mosul operation, citing officials it said were involved in talks with the United States as well as sources in Iraq.

It said the operation was expected to begin in a few days, "if there is no extraordinary development".

Mosul, home to up to 1.5 million people, has been at the heart of Islamic State's self-declared caliphate in Iraq since 2014. The U.S.-backed assault on the city has been expected to begin this month.

On Thursday, Erdogan's spokesman warned any mistake in the operation could result in hundreds of thousands of refugees.

Anadolu said the Turkish-trained forces would participate in the operation together with the Iraqi army and the peshmerga forces of the Kurdistan Regional Government in northern Iraq, with the latter launching the operation.

Broadcaster CNN Turk said the head of Turkey's armed forces, General Hulusi Akar, was going to the United States to attend a meeting of his counterparts from coalition countries.

(Additional reporting by Akin Aytekin and Tuvan Gumrukcu in Ankara; Writing by Daren Butler; Editing by Nick Tattersall and Dominic Evans)