On the heels of a major suicide bombing in the border town of Suruç a couple weeks ago, Turkey has officially joined the war against ISIS—though it’s not clear what it actually aims to achieve. Turkey and its leader Recep Tayyip Erdogan were riding high just a few years ago, with a strong economy and a growing international profile. Now the country’s economy is tumbling, and its politics are fragmenting. These 5 facts explain Turkey’s various motivations for going to war. Be warned—they’re complicated.

1. A Faltering Economy

Until recently, Turkey was an emerging market darling. In 2010, its economy was growing at a robust 9.2 percent. But by 2013, GDP growth had fallen to 4.1 percent. The slowdown has continued, and growth for 2015 is now forecast at 3.1 percent, which may actually be a generous estimate. Unemployment in the country has reached 11 percent, the highest rate in 5 years.

It’s not clear that joining the fight against ISIS will directly help Turkey’s economy. In fact, it probably won’t—fighting wars, especially open-ended ones, cost money. But it will distract a populace that’s growing increasingly unsettled by the economy’s slowdown.

(IMF World Economic Outlook, Bloomberg, Global Peace Index)

2. Stumbling AKP

The slowing economy has also upended the country’s politics. Turkey was a secular Muslim country for nearly a century until 2002, when Erdogan’s Islamic Justice and Development Party (AKP) rose to power. It went on to win four consecutive elections, peaking at 49.9 percent in 2011, while presiding over a booming economy. Since then Erdogan has seen his personal popularity plunge from 71 percent to 37.5 percent today. Support for the AKP dropped nearly 10 percent in elections this past June, and the party lost an absolute legislative majority it had enjoyed for 13 years. Who capitalized on the AKP’s poor election performance? The pro-Kurdish HDP, which entered parliament for the first time by capturing 13 percent of the vote. (Political parties must win at least 10 percent of the vote in Turkey in order to enter the legislature.)

Now the AKP must choose between inviting an opposition party to join a coalition government or calling early elections to try to regain its majority. Joining the ISIS war effort serves two political aims: it tarnishes the HDP by associating the party with Kurdish separatist groups accused of terrorism, and it drums up enough nationalist sentiment to peel off votes from the far-right Nationalist Movement Pary. Erdogan will watch the polls. If the AKP’s numbers rise toward 50 percent, he’s likely to push for another vote.

(Brookings, Guardian, Al-Jazeera, Reuters)

3. Syrian Refugees in Turkey

Turkey is currently providing shelter for nearly 2 million Syrian refugees, and that figure is projected to rise another 500,000 by the end of 2015. Put another way, more than half of the 4 million Syrians who have fled their country during the civil war now reside in Turkey. Ankara has established 25 refugee camps, and reports say they are relatively well-run. The problem is the cost—Ankara estimates that it has spent nearly $5.6 billion on refugees since the beginning of the crisis. Combined with its flagging economy, it is not clear how much longer Turkey can continue shouldering the burden. The sooner the fighting in Syria ends, the sooner these refugees can return home.

(European Commission, UNHCR, Al-Jazeera)

4. Violent History with the PKK

Now things start to get murky. On July 20, an ISIS suicide bomb ripped through the Turkish town of Suruç, killing 32 people. The victims were supporters of the Kurdistan Workers Party (PKK), the Kurdish separatist party based in Turkey and affiliated with the People’s Protection Units (YPG), the Kurdish group currently battling ISIS in Syria. After the Suruç attack, some Turks blamed the AKP government for not protecting the country against terrorism, while Turkish Kurds have accused the government of being complicit in the attacks. They claim that Erdogan’s government has tolerated ISIS attacks on Kurds because ISIS militants threaten Syria’s Bashar al-Assad, Turkey’s enemy, and also prevent Kurds from gaining ground in Syria that might help them to eventually create a larger Kurdish homeland in the region.

Erdogan may have declared war on ISIS to blunt criticism that he is soft on terrorism, but this bombing really speaks to the long strained relationship between Turks and Kurds. The Kurds are a sizeable ethnic minority in the region that have been agitating for independence for decades. The last 40 years have been marred by Turkish-Kurdish violence, claiming the lives of 40,000 people. A ceasefire was reached in March 2013, but it didn’t last long. According to Turkish security authorities, the PKK has carried out over 2,000 acts of violence in 2015 alone.

(Reuters, Wall Street Journal, Middle East Monitor)

5. A War Against…Whom?

It’s obvious that Ankara is alarmed by the progress Kurdish fighters in Syria are making against ISIS and Assad, which they fear will only stoke the independence dreams of Turkish Kurds. In response to the Suruç bombing, Turkish police launched security raids across the country, rounding up more than 1,300 suspects in a matter of days. But the number of PKK militants detained outnumber ISIS affiliates more than 6 to 1. Between July 23 and July 26, 75 Turkish jets flew 155 sorties against 400 or so PKK targets. Number of ISIS targets hit? Three.

Officially joining the war against ISIS will give Turkey the cover it needs to bomb the Kurdish separatists carving out territories along the Turkish border. And it seems Washington is willing to ignore attacks on Kurds in exchange for US access to the Incirlik airbase, useful for bombing ISIS inside Iraq. Only time will tell if Turkey and America’s political and military strategies will pay off.

(Reuters, The Independent, Al-Monitor, New York Times)

Get The Brief. Sign up to receive the top stories you need to know right now. Please enter a valid email address. Sign Up Now Check the box if you do not wish to receive promotional offers via email from TIME. You can unsubscribe at any time. By signing up you are agreeing to our Terms of Use and Privacy Policy . This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply. Thank you! For your security, we've sent a confirmation email to the address you entered. Click the link to confirm your subscription and begin receiving our newsletters. If you don't get the confirmation within 10 minutes, please check your spam folder.

Contact us at letters@time.com.