Following a four-hour discussion, the presidents of Russia and Turkey, Vladimir Putin and Tayyip Erdogan, decided to strengthen their collaboration, according to a joint statement from the two countries. Deputy Prime Minister Alexander Novak announced after the meeting that Turkey has agreed to pay Russia partially in rubles under the new deal.

Turkey imports about half of the gas it uses from Russia.

As part of the agreement, Turkey agreed to alter how it pays Russia for natural gas, which would expand collaboration in the transportation, agriculture, financial, and construction industries and present a visually cohesive front against “terrorist organizations” in Syria.

To protect Russia from the effects of Western sanctions, Russian President Vladimir Putin said months ago that unfriendly nations would have to pay for Russian energy through a ruble account. Although Russia would not view Turkey as an unfriendly country, Turkey’s purchase of Russian natural gas in rubles would shield those payments from sanctions and might help things go more smoothly with Moscow, which otherwise might not be pleased with Turkey’s operations in Syria.

Turkey also assisted in negotiating a deal to ship grain between Russia and Ukraine last month, further solidifying ties between the two countries.