ANKARA, Jan 17 (Dan Williams/Reuters) - Turkey and Israel will remain allies as long as their interests align, Turkey's Defense Minister said after talks with Israeli counterpart Ehud Barak on Sunday aimed at mending frayed relations.

Ties have been damaged most recently by fallout from a diplomatic spat involving the televised humiliation of Turkey's ambassador by the Israeli deputy foreign minister.

Muslim but secular Turkey has a history of military cooperation with Israel and has acted as an intermediary for the Jewish state with the Arab world.

But Turkey has frequently criticised Israel's offensive in Palestinian-ruled Gaza a year ago, most notably when Prime Minister Tayyip Erdogan walked away from a panel discussion in Davos after a confrontation with Israeli President Shimon Peres.

Turkish Defence Minister Vecdi Gonul, speaking in English, said Turkey wanted to cooperate with Israel and called the two countries neighbours because of their shared interests.

As long as we have the same interests, we work together, to fix the common problems. Also we are allies, we are strategic allies as long as our interests force us to do so, said Gonul.

Barak struck a more conciliatory note, saying it was proper and right to leave the ups and down of the two countries in the past.

Barak, a former army general and Israeli premier, also met Turkish Foreign Minister Ahmet Davutoglu on Sunday after visiting the tomb of Mustafa Kemal Ataturk, the founder of modern Turkey. Neither party issued a statement afterwards.

NOT TO BE TAKEN FURTHER

An aide to Barak said he welcomed the comments from Gonul.

I understand it as something very positive. He said that such is the strength of the forces bringing the two countries together, that no momentary frisson can be allowed to drive them apart, he said.

Gonul also said that Turkey did not approve of nuclear weapons in neighbouring countries, at once supporting the West's policies against Iran's nuclear projects, but also pointing to Israel's assumed atomic arsenal.

Israelis have also been upset by two Turkish television dramas showing their soldiers as murderers of Palestinian children and their diplomats as masterminds of a kidnapping ring.

Prime Minister Erdogan, who was conspicuously absent from Barak's schedule, said at a separate news conference that he did not care to carry the issues any further and attributed differing messages coming from Israel as a lack of cohesion within its coalition government.

Erdogan, whose AK Party's roots lie in political Islam has left Israel particularly aggrieved by his public fury at the hundreds of civilian dead in Gaza.

Turkey barred Israel from participating in a NATO war exercise late last year because of its public's concerns over the Gaza offensive, which Israel says was launched to stop Hamas rocket attacks.

Erdogan has since held meetings with the president of Syria and hosted his good friend Mahmoud Ahmadinejad at an Islamic conference in Istanbul. Both countries are foes of Israel.

Turkey's tilt toward Tehran has been watched with worry by Washington, which is at loggerheads with Iran over its nuclear programme. Israel sees the prospect of an Iranian bomb as a threat, while Iran says its nuclear programme is peaceful.

Erdogan brokered short-lived Israeli-Syrian peace talks in 2008. Some Israeli officials now question his fitness to mediate and Netanyahu had said his government would negotiate only directly with Damascus.

Despite the diplomatic row, Turkey is trying to buy 10 Heron drones in a deal worth $180 million, officials on both sides said. An Israeli official on Sunday said the deal looked close to being finalised. Turkey has no drones of its own. (Writing by Thomas Grove and Dan Williams; Editing by Dominic Evans)