"Our only goal is to eliminate the terrorist organisations that pose a threat to Turkey. A ground operation is one of the options to eliminate this threat, but it is not the only option for us," the official said.

Turkey has redoubled its operations targeting the outlawed Kurdistan Workers' Party (PKK) after it claimed the bomb attack in Ankara, by carrying out air strikes in northern Iraq.

Turkish officials said any infrastructure and energy facilities in Iraq and Syria controlled by the PKK, as well as People's Protection Units (YPG), were legitimate military targets.

Ankara sees the YPG as the Syrian wing of the PKK.

"The PKK and the YPG are the same terrorist organisation, they are our legitimate target everywhere. Turkey conducted operations whenever and wherever necessary in the past, and these operations will continue if needed again," the defence ministry official said.

"These operations are being conducted under self-defence rights arising from international law to eliminate terrorist attacks on Turkish territory and to ensure border security."

The YPG is also the spearhead of the main ally of the U.S.-led coalition against Islamic State. Support for the YPG by the United States and other allies, including France, has strained ties with Ankara.

Turkey has warned forces of third countries to stay away from facilities controlled by the PKK and YPG.

"We are calling on all parties, our friendly and allied countries in particular, to stay away from those terrorists. This is just a reminder. It is up to them to take necessary precautions," the official said, without naming any country.

(Reporting by Huseyin Hayatsever; Editing by Jonathan Spicer and Alex Richardson)