Afghan Taliban leaders said they would do all they can to help Afghan migrants in Turkey wanting to return home, the Turkish foreign minister said on Thursday after talks in Ankara, adding that both sides discussed how to prevent another “migrant wave”.

Turkey hosts some four million migrants, mostly Syrians, and has come under renewed pressure after the takeover of Afghanistan by the Islamist Taliban in August prompted a mass exodus. It has said it will not tolerate a fresh wave.

The Taliban ruled Afghanistan with an iron hand from 1996 to 2001 before being ousted by US-led forces.

Nato member Turkey maintained its embassy in Kabul after Western countries withdrew following the fall of the US-backed Afghan government and has urged those countries to increase engagement.

Turkish Foreign Minister Mevlut Cavusoglu, who earlier said he would visit Kabul, discussed migration, humanitarian aid, the economy and other issues with a delegation led by Afghan acting Foreign Minister Amir Khan Muttaqi.

“We told them again that they need to be inclusive for the unity of the country,” Cavusoglu told Turkish state media. “They conveyed to us their request for continuing aid and investments there.

“We have a certain number of Afghan migrants, irregular or regular. Some of them want to return to Afghanistan. The Taliban leadership said … they would provide all the support they can for them to return home, but we also discussed what we can do to prevent another migrant wave.”

Cavusoglu said he had also conveyed Turkey’s recommendations regarding the inclusion of women in the work force and education of girls.

On Monday, Muttaqi appealed to the world for good relations, but avoided making firm commitments on girls’ education despite international demands to allow all Afghan children to go back to school.

The new administration has come under sustained criticism for its approach to girls’ education, considered one of the limited number of unambiguously positive gains from the West’s two decades of involvement in Afghanistan.

Taliban officials say they will not repeat the harsh rule of the previous Taliban government toppled in 2001, which banned most girls’ education and forbade women from going out in public without a male guardian.

Turkey, which scrapped plans to run Kabul airport after failing to agree on security measures with the Taliban, has been working with Qatar to operate the airport and re-open it to international travel.

Cavusoglu said he had conveyed the security “expectations” of Turkey and the international community over the airport, adding they had also discussed counter-terrorism.