President Vladimir Putin has sent condolences after a Russian air strike accidentally killed three Turkish soldiers in northern Syria.
The strike hit a building near the town of al-Bab, believing it to contain Islamic State (IS) fighters rather than Turkish troops, Turkey's military said.
Eleven others were wounded in the so-called friendly fire incident.
They were supporting Syrian rebels who are locked in a fierce battle to try to capture al-Bab from IS fighters.
Russia and Turkey, who back opposing sides in the Syrian war, have been jointly conducting air strikes on IS in the town in recent weeks.
The Russian aircraft had been planning to hit IS targets but "by accident three of our soldiers were martyred when a building was bombed where our units were," Turkey's military said.
The Kremlin has issued a statement (in Russian) saying President Putin had, in a telephone call with his Turkish counterpart, "expressed condolences over a tragic incident which resulted in the deaths of several Turkish troops in the al-Bab area".
President Putin told Recep Tayyip Erdogan that poor co-ordination between Moscow and Ankara was to blame for the accident, RIA news agency reports.
The two leaders agreed to "increase military co-operation during operations in Syria against IS militants and other extremist organisations".
Both countries are conducting a joint investigation, Turkey's military said.
The incident comes after a warming of relations between the two countries, which had previously been strained after Turkey downed a Russian jet near the Syrian border two years ago.
Earlier on Thursday, Turkish-backed rebel fighters managed to capture the western outskirts of al-Bab, which lies about 30km (20 miles) south of Turkey. Turkish media say 10 Turkish soldiers have been killed in the fighting in recent days.
The Dogan news agency says 66 Turkish troops have been killed in Syria since Turkey began its operations there last August to drive out IS, as well as stop the advance of the Kurdish YPG militia - which Turkey considers a terror organisation.
'What a difference a year makes' - by Mark Lowen, BBC Turkey correspondent
At the end of 2015, Russia and Turkey risked military confrontation as the Turkish military shot down a Russian jet which it said had violated its airspace. By the end of 2016, the two, who back opposite sides in the Syrian war, were co-operating to reach a ceasefire in Aleppo.
The murder of the Russian ambassador in Ankara didn't derail ties - and nor will today's military accident. Why? Because the two countries need each other. Partly in their general bilateral relations, with Turkey importing most of its energy from Russia and relying on Russian tourists. But partly too in order to achieve their respective aims in Syria.
Turkey wants a buffer zone in northern Syria free of IS and the Kurdish militia that it sees as terrorists - and has needed Russian consent for its troops to launch a ground offensive in northern Syria over the past few months. And Russia has managed to prop up the Assad regime and needed Turkey - one of Assad's fiercest opponents - to turn a blind eye to the recapture of Aleppo. Realpolitik has taken the place of steadfast ethics - as it so often does.
The Turkish-backed Syrian rebels have been battling IS for al-Bab since late 2016.
Syrian government forces, meanwhile, are also closing in on IS from the south, where fierce fighting is reported.
Reports suggest the rebels and government forces have reached an accommodation over al-Bab, orchestrated by Syria's key ally, Russia.
The two sides are now within 3km of each other on opposite sides of the city.
Despite supporting opposing sides, Russia and Turkey have joined forces in recent months to try to end the Syria conflict.
A recent history of Russian-Turkish relations:
- November 2015: Turkey downs Russian jet near Syrian border, sparking crisis in relations and Russian sanctions on Turkey
- June 2016: Turkish President Erdogan expresses regret over downing of jet, beginning process of normalisation of ties
- December 2016: Russia's ambassador to Turkey is shot and killed by a Turkish policeman in Ankara. Later that month, Russia and Turkey broker nationwide ceasefire deal in Syria
- January 2017: Russia and Turkey begin joint air strikes against IS in Syria
- February 2017: Russian air strike kills three Turkish soldiers in Syria's al-Bab