While the Kurds in Syria were partners with the United States in fighting the Islamic State, reclaiming villages and cities from the extremist group, they are facing a new twist in the latest complex chapter of the conflict. Turkey says the Kurds in control of the enclave of Afrin, in Idlib Province in northern Syria, are a terrorist threat, and the Turks have recently launched an offensive to dislodge them.

Now, some of those fighting alongside the Kurds are vowing to fight against Turkey. For the Westerners, their personal support for the group’s vision has largely fit with the interests of the American-led coalition for much of the war. The United States provides material support and training to the Syrian Defense Forces — dominated by the Kurdish fighters — in their campaign against the Islamic State. But Turkey considers the Y.P.G. a terrorist organization because many of its leaders have links to the Kurdistan Workers’ Party, also known as the P.K.K., putting the Western fighters directly at odds with a NATO ally.

Here’s what you need to know about the foreigners in the Y.P.G. and what they are doing in Syria.

How are foreigners joining the militia?

Throughout the Syrian war, Kurdish militias have made themselves accessible to Westerners looking to join the fight, welcoming them to Syria and giving them training. The militia members have an active social media presence geared toward international recruits, and they regularly post updates, often in English, focusing not just on warfare but also on their vision for an autonomous Kurdish society. They call their movement the Rojava revolution, the name the Kurds have given to the region in northeastern Syria that they now control.