The Kurdish expression “No friends but the mountains” has become more painfully true in recent weeks.

On Oct. 26, a U.S.-led raid killed the world’s most wanted terrorist, the Islamic State group’s leader Abu Bakr al-Baghdadi, thanks to a Kurdish forces informant who was a spy in the terror group’s inner circle. Meanwhile, American forces continued their withdrawal from northeastern Syria and Turkey moved into the area formerly controlled by the United States’ Kurdish allies. Fighting has raged in the area for weeks, and forced tens of thousands of Kurdish civilians to flee their homes, according to aid organizations.

The dramatic reversal for the U.S. allies followed President Donald Trump’s Oct. 9 announcement that the U.S. would withdraw forces from Syria, which allowed for the Turkish invasion and the displacement of Kurdish fighters who had been vital U.S. partners in the war on ISIS.

This time it wasn't supposed to work out like this, said Shivan Fazil, a Kurdish Iraqi political analyst based in Erbil, Iraq.

"They really did feel that this time, they should not be abandoned and betrayed,” he said. NBC News explains who the Kurds are, and why Trump's move was the latest in a string of reversals that members of the ethnic group feel they have suffered at the hands of erstwhile allies.

History repeats itself

The Kurds are a distinct ethnic group that is mostly moderate Sunni Muslim, although a small percentage are Shiites, Christians and Jews. Some 30 million of them live scattered throughout Turkey, Iraq, Iran and Syria, as well as in diaspora communities in Europe and the U.S.

Kurds tried but failed to form a separate state after the collapse of the Ottoman Empire around 100 years ago, and instead carved out self-governed regions in countries such as Syria and Iraq.

And after World War I, Western powers divided the former empire into the current Middle East, promising the Kurds a part of present-day Turkey in the Treaty of Sevres in 1920.

Three years later, the Treaty of Lausanne scrapped this decision, establishing Turkish sovereignty on the new Republic of Turkey. So, from the beginning, the Kurds’ ethnic identity became a challenge to the newborn Turkish nation. Now, they make up 20 percent of Turkey’s population.

Being a Kurd in the Middle East

Over the decades, Turkey tried to assimilate its Kurdish population by prohibiting Kurdish language and folklore to the point of banning their own name, addressing them as “Mountain Kurds.”

Several revolts have accompanied the attempts at self-determination. The PKK, the Kurdistan Workers' Party, based in Turkey, spearheaded these with armed clashes and suicide bombings, and is widely branded a terrorist group.

“In Turkey, there is an intolerance and a criminalization of Kurdish political identity,” Emma Sinclair-Webb, the Turkey director for New York-based Human Rights Watch, said. “Turkey abuses counterterrorism law against those Kurds who exercise their freedom of expression, assembly and association. It’s an abuse of power.”

The Kurds had similar experiences in Syria, where the Syrian regime, run by two generations of al-Assads, Hafer and his son and current president, Bashar, attempted to "Arabize" the population. A 1962 decree denied basic rights such as nationality, right of property, voting or even driving a car to around 200,000 Syrian Kurds.

In Iraq, before they managed to carve out the Kurdistan region in the aftermath of the Persian Gulf War in 1991, a region recognized by the Iraqi constitution, Kurds suffered as well.

Skulls and bones, clothing and other belongings found in shallow graves offer up valuable clues to investigators gathering evidence on the 1987-1988 Anfal campaign. Ali al-Saadi / Pool via Getty Images file

Saddam Hussein president of Iraq ordered the 1988 Al-Anfal campaign against the Kurds, a series of genocidal attacks that killed hundreds of thousands of Kurds in northern Iraq. Human Rights Watch believes between 50,000 and 100,000 people were killed during this campaign.

A country in chaos

After the Syrian civil war started in 2011, the borders involving Iraq, Syria and Turkey shifted.In the chaos of the early stages of the civil war, Kurdish forces established control in northeastern Syria. Inhabited by mostly Kurdish populations, the region of Rojava is governed and protected by Kurdish political and military groups.

Many argue that these Kurdish alliances governing Rojava found their political inspiration in the PKK, deemed a terrorist organization by both Turkey and the U.S. and an archenemy of Ankara's regime.

Kurdish protesters carry flags and a banner with a portrait of of jailed Kurdistan Workers Party (PKK) leader Abdullah Ocalan during a demonstration against Turkey's military action in northeastern Syria in Zurich, Switzerland Oct. 12. rnd Wiegmann / Reuters

Newly-born and still imposing itself in a country ravaged by war, the Kurds of Rojava found their greatest ally, the U.S., through fighting a common enemy, ISIS.

The U.S.-led coalition backed the Kurdish militias who were trying to win back the regions ISIS infiltrated. The coalition also provided support to the Kurds in their continuous battle against Turkey-backed forces.

In contrast to how the U.S. government has traditionally viewed the Kurdish People's Protection Units — widely known as the YPG that fought alongside U.S. forces — Turkey's President Recep Tayyip Erdogan sees the Kurdish fighters as a threat to his country's security.

Having them so close to Turkey's border for the last seven years, and so close to the U.S., made him uneasy. So he convinced Trump to pull out of Syria and attempted to change its borders’ demographics.

Turkey’s move

There are currently around 3.6 million Syrian refugees in Turkey. Despite continued injections of funds from Europe, Turkey has struggled to cope with such numbers, so Erdogan has pushed plans to resettle them into this new "safe zone" he carved out of Rojava.

In August, Turkish Interior Minister Süleyman Soylu said that only 17 percent of Syrian Arab refugees in Turkey are indeed from the northeast region where Erdogan plans to resettle them. But should the move be finalized, the Turkish-Syrian border ethnic composition will change from Kurdish to Arab, a far better choice for Ankara’s regime.

“If you move large amounts of people in an area of a country and possibly displace the inhabitants of that area in the meanwhile, that can constitute a war crime,” Sinclair-Webb said.