Israel has offered Turkey its help following an earthquake that left almost 40 people dead in the coastal city of Izmir.

The 7.0-magnitude earthquake erupted in the Aegean Sea on Friday, leading to devastation in Izmir and on the nearby Greek island of Samos.

In Izmir, multiple buildings collapsed following the quake, killing 64 people and wounding some 900 others. In Samos, two teens were killed when a wall collapsed on them and some 20 others were injured.

Defense Minister Benny Gantz offered Israel’s aid on Friday, tweeting that he had instructed the Israel Defense Forces to prepare to provide emergency assistance to Turkey and that army officials had spoken with the Turkish military attaché in Israel.

Israel’s consulate in Istanbul tweeted condolences for victims and support for Turkey, noting that “Israel is ready to send humanitarian assistance in case needed.”

Turkey turned down all offers of assistance from countries around the world, however, noting that local authorities have taken control of the situation.

Turkish President Recep Tayyip Erdoğan thanked the international community on Twitter in a message that bore the flags of the countries that had offered their help, including that of Israel.

“Many thanks from the Republic of Turkey to all friendly nations and international organizations for their good wishes and statements of support following the earthquake in Izmir,” he said.

Israel’s offer of aid came despite tense relations between the two formerly close nations. Friday’s earthquake was also not the first time Israel offered its help to Turkey – in 1999, it sent a large-scale rescue mission to aid the country following a devastating earthquake that left 17,000 people dead.