Ankara is willing to work together with Jerusalem in fighting international terrorism, Turkey’s President Recep Tayyip Erdogan told his Israeli counterpart Reuven Rivlin Wednesday, in a rare phone call between the two leaders.

Erdogan expressed his condolences to the Israeli people after a terror attack Saturday in Istanbul killed three Israelis and an Iranian, condemned all sorts of terrorism as “evil,” and expressed the will to cooperate on the global effort to fight the phenomenon.

“I believe that against this terrorism we have to stand together with the international community and take a very, very firm stance, and increase our cooperation against all terrorist acts,” Erdogan told Rivlin, who initiated the call.

“In this regard we are ready to cooperate with Israel against terrorism.”

Saturday’s attack was carried out by a man affiliated with the Islamic State called Mehmet Öztürk, Turkish authorities said this week.

Rivlin made the call to thank his Turkish counterpart for a condolence letter he had sent him earlier this week, the first high-level communication between the countries leaders in years.

Turkish police push people away after an explosion on a pedestrian shopping street in Istanbul on March 19, 2016. (AFP/Bulent KILIC)

Turkish police push people away after an explosion on a pedestrian shopping street in Istanbul on March 19, 2016. (AFP/Bulent KILIC)

“There cannot be good terrorists or bad terrorists, they are all evil, we have to fight against evil and I want to thank you again for your call,” Erdogan told Rivlin.

The conversation between Turkish and Israeli presidents, together with a letter of condolence Prime Minister Benjamin Netanyahu received from his counterpart in Ankara, Ahmet Davutoglu, indicate a certain detente between the two countries.

Relations have been cold for years but in recent months progress has been made toward a reconciliation agreement, and the close cooperation between Israeli and Turkish authorities in the wake of the Istanbul attack suggest a further rapprochement.

However, efforts to completely rehabilitate bilateral ties, including the exchange of ambassadors, are currently stuck, partly due to Ankara’s refusal to prevent senior Hamas operatives from living in and planning attacks against Israelis from Turkish territory.

President Reuven Rivlin at the President's Residence in Jerusalem on February 10, 2016. (Mendy Hechtman/Flash90)

President Reuven Rivlin at the President’s Residence in Jerusalem on February 10, 2016. (Mendy Hechtman/Flash90)

Rivlin, who apparently did not mention Hamas during the call, thanked Erdogan for his letter of condolence and for enabling good cooperation between the countries’ officials on the ground in the aftermath of the Istanbul blast.

“I want to thank you for all the care you have taken for all our citizens, and for your help in bringing the victims back to Israel with dignity,” Rivlin said. “Mr. President, terror is terror, life is life, and blood is blood, whether it is in Istanbul, Brussels, Paris or Jerusalem. We must all stand together in the fight against this terrible evil.”

Erdogan expressed his “deep sadness” over the three Israelis’ death. “After the incident I immediately instructed the related agencies to do all that was necessary to help, and immediately the governor of Istanbul, the minister of the interior, the Foreign Ministry and the Health Ministry officials were mobilized to help in the recovery,” he said. “I also felt that our own Jewish community, which is an integral part of our society, also provided any necessary help. I also spoke with the Chief Rabbi Ishak Haleva and also the head of the Jewish community İshak İbrahimzadeh.”