For the past few years, Turkey has substantially increased its involvement in the Afghan conflict. Experts say President Erdogan is aiming to strengthen his position in NATO and increase clout in the Muslim world.
Turkish President Racep Tayyip Erdogan visited Afghanistan after the war-ravaged country's controversial presidential election in 2014. Although Afghanistan and Turkey have enjoyed close relations since the two nations signed their first "alliance agreement" in 1921, Erdogan's 2014 Afghanistan trip marked the beginning of a new era between the two Muslim-majority nations.
Ankara's involvement in Afghanistan substantially increased after the 2001 US invasion that led to the collapse of the Taliban regime. As a NATO member state, Turkey deployed its troops to Afghanistan in 2002 and since then has had a strong military presence there.
Turkey is the only NATO member state that did not reduce the number of troops in Afghanistan after NATO's combat mission ended in 2014. Instead, it boosted its military presence there, taking a more prominent role in NATO's "Resolute Support" training mission.
Erdogan has made no secret of his ambitions to increase his country's clout among the Muslim nations
In 2015, President Erdogan suggested that Turkey could have a long-term military presence in the country that neighbors China, Iran, Pakistan and a number of Central Asian states.
Ties with Afghan politicians and Islamists
Observers say Turkey's Afghanistan policy is far more ambitious than what it appears on the diplomatic front. Long before NATO's direct Afghanistan involvement, Ankara had kept a close eye on Afghan politics, establishing cordial ties with a number of political groups over the years.
Turkey is particularly close to Afghanistan's Vice President Abdul Rashid Dostum. Dostum and his Uzbek supporters - a Turkic ethnic group based in northern Afghanistan - can relate to Turkey more than any other NATO member state because of their shared language and culture.
Dostum, a former warlord accused of war crimes, is a controversial figure in Afghanistan. Despite opposition from Western diplomats, the vice president continues to enjoy Turkish support.
Turkey's involvement in Afghan affairs is evident from its mediating role in a case relating to a sexual abuse and political torture scandal involving Dostum. After the pressure exerted by Western diplomats to act against his vice president, Afghan President Ashraf Ghani's government framed charges against Dostum earlier this year.
Despite Ghani's relentless efforts, he was unable to convince Dostum to appear before a trial. The president then sought Erdogan's help in the matter.
After months of mediations, Dostum finally left for Ankara in May. Dostum recently joined hands with two former Afghan warlords - Atta Mohammad Nor, the powerful governor of the northern Balkh province and Mohammad Mohaqiq, a deputy to the Afghan Chief Executive Abdullah Abdullah - and formed an alliance against President Ghani.
"The fact that Dostum was able to form a political alliance against the Afghan government while in Turkey shows how much influence Ankara has over Afghan politics," former Afghan diplomat Ahmad Saidi told DW.
"Kabul and Ankara have friendly ties, therefore Turkey should not allow its soil to be used against Ghani," he added.
Dostum is not the only key player in Afghanistan that enjoys Turkey's support; Ankara has also kept close ties with some Islamist groups in Afghanistan, including the Taliban.
"Turkey has increased its contacts with the Taliban leadership in recent years due to their common interest in keeping the 'Islamic State' (IS) militant group at bay," Faiz Mohammad Zaland, a lecturer in Kabul, told DW.
Leading the Muslim world?
President Erdogan has made no secret of his ambitions to increase his country's clout among Muslim nations. Analysts say he is positioning himself as a leader of the Muslim world, promoting his country as an alternative to Saudi Arabia and Iran.
Turkey has hosted a series of Afghanistan conferences in the past few years. Ankara has also urged Afghanistan and Pakistan to resolve their differences and work for regional peace and stability. It has called on the Taliban to engage in peace talks with Kabul.
Although Turkey has not been successful in bringing Islamabad and Kabul closer together, or convincing the Taliban to enter talks with the Afghan government, its increased efforts in Afghanistan show Erdogan's interest in the region.
"NATO and the Middle Eastern Muslim countries have interest in Afghanistan's future and President Erdogan is aiming to use it in his favor," Zaland said.
According to the Kabul-based expert, Erdogan believes that a Turkey-brokered peace deal in Afghanistan would elevate his position in NATO and also the Muslim world.
"The Turkish president wants NATO members to acknowledge that there cannot be any success in Afghanistan without Ankara's help," underlined Zaland, adding that Turkey could gain political leverage over its European allies by using its influence in Afghanistan to achieve NATO's goals in the war-torn country.