|Reuters

ANKARA (Reuters) - Turkish President Tayyip Erdogan on Wednesday ruled out an immediate end to the year-old state of emergency imposed after a failed coup, saying it could only be lifted once a fight against terrorism was finished.

Earlier on Wednesday Turkish authorities detained 14 army officers and issued warrants for the detention of 51 people, including 34 former employees of state broadcaster TRT, for suspected links to the coup, local media reported.

"There can be no question of lifting emergency rule with all this happening," Erdogan said in a speech to investors in Ankara. "We will lift the emergency rule only when we no longer need to fight against terrorism."

He said the end of emergency rule could be possible "in the not-too-distant future", but gave no specific time frame.

Ankara imposed the state of emergency soon after the coup attempt last July, when a group of rogue soldiers commandeered tanks, helicopters and warplanes and attacked parliament in a bid to overthrow the government, killing more than 240 people.

Since then, some 150,000 people have been sacked or suspended from the army, civil service and private sector and more than 50,000 detained for alleged links to the coup.

Emergency rule allows the president and cabinet to bypass parliament in passing new laws and to limit or suspend rights and freedoms as they deem necessary.

Critics say Erdogan is using the measures to quash dissent, while the government says they are necessary because of the gravity of the security threats Turkey faces.

MILITARY PURGES NEAR END

Prime Minister Binali Yildirim said on Wednesday that the purges in the military were probably coming to an end.

Some 7,655 military personnel - including 150 generals and admirals and 4,287 officers - have been dismissed since the coup.

"The military purge has been largely completed by the dismissal of soldiers across all ranks. This struggle will continue until the last FETO member has paid the price for their treason," Yildirim told the same conference in Ankara.

FETO is the term the government uses for the network of the U.S.-based Islamic cleric Fethullah Gulen it blames for the coup. Gulen, who has lived in self-imposed exile in the United States since 1999, has denied playing any role in the coup.

Police killed five Islamic State militants in a dawn raid on a house in the central city of Konya on Wednesday, the local governor's office said, adding that four police officers were slightly wounded.

There were suspicions that those killed may have been planning to target events being held this week to commemorate the first anniversary of the coup, according to the private Dogan news agency.

A statement by the police said 233 suspected Islamic State members were detained in operations in 29 provinces across the country. Twenty-five of them were foreign nationals.

Turkish security forces are also battling militants of the outlawed Kurdistan Workers Party (PKK), which has waged a three-decade insurgency against the state that has resulted in more than 40,000 deaths.

(Reporting by Ece Toksabay and Daren Butler; Writing by David Dolan; Editing by Ralph Boulton)