Gaziantep, a city in southern Turkey some forty miles from the Syrian border, has become a bustling hub at the center of the Middle East’s latest conflict. It’s a destination for spies and refugees, insurgent fighters and rebel leaders, foreign-aid workers and covert jihadists—all enmeshed in Syria’s multisided war.

I recently drove to one of Gaziantep’s upscale neighborhoods, an area of pastel apartment blocks with balconies, and took pictures of American Patriot-missile batteries on a nearby hillside. They were pointed at Syria. The missiles were deployed, last year, to defend against Scuds fired at rebel militias by the government of Bashar al-Assad. (Several Scuds had struck close to the border, and occasional artillery shells landed in Turkey.) Now the fighters of the Islamic State in Iraq and al-Sham, a.k.a. ISIS or ISIL, are also just across the border, less than an hour away. During an inspection visit in October, NATO’s Secretary-General, Jens Stoltenberg, told American troops manning the missiles, “Your mission is more important than ever.”

Until this summer, when ISIS began seizing large portions of Syria and Iraq, Gaziantep—or Antep, as the locals call it—was best known for its baklava. The city’s 1.5 million inhabitants have thrived as Turkey’s economic boom during the past decade brought rapid development to the Anatolian hinterlands. The Forum Mall, which opened last year, has a Popeyes, an Arby’s, a KFC, a McDonald’s, a Burger King, and a Starbucks. In October, “Fury,” with Brad Pitt, played at the cinema. I watched a red Lamborghini as it roared down a wide boulevard.

For years, Turkey maintained cordial relations with Syria—the shared border is five hundred miles long—as part of a “zero problems with neighbors” policy. In 2008, President Recep Tayyip Erdoğan, who was then Prime Minister, welcomed the vacationing Assad family at an Aegean resort. But not long after the Syrian uprising began, in 2011, Erdoğan declared, “It is not heroism to fight against your own people.” He urged Assad to step down, “for the welfare of your country, as well as the region.”

Since then, Turkey has done more than any other nation to harbor Syria’s political and military opposition. Gaziantep is now home to the nascent Syrian Interim Government. Leaders of the Supreme Military Council and rebel commanders of the Free Syrian Army are regular visitors. The United Nations runs aid missions from Gaziantep, as do several other international organizations and a number of businesses.

Gaziantep is particularly important to the United States. Washington closed its Embassy in Damascus in early 2012, and most American aid operations involving Syria are now directed from southern Turkey. The American effort includes three billion dollars in humanitarian assistance, such as food and medical aid, not only to refugees but also to Syrians inside the country. The United States has spent two hundred million dollars on everything from garbage trucks and ambulances to communications gear in order to prop up local councils struggling to provide essential services in rebel-held areas. An additional ninety million dollars has gone to equip armed opposition groups with nonlethal matériel, from trucks to ready-made meals. But there is no U.S. consulate, or even rented diplomatic office space, for American officials in Gaziantep, because of perceived dangers.

For more than two years, Turkey allowed entry to thousands of foreigners, from dozens of countries, who ended up crossing the border to fight alongside the rebels. Young men disembarked at Gaziantep’s little airport and drove down the road to join the war. Some of them were Turks, including lawyers, students, merchants, even government employees. Earlier this year, though, after ISIS began attacking rebel groups and seizing Syrian territory that the rebels had liberated, the Turkish government clamped down; it claims to have deported a thousand would-be European jihadists and put six thousand others on a no-entry list. Even so, during the past two months, hundreds of men—and a few women—have reportedly crossed the frontier to join the jihadists.

This summer, ISIS was widely believed to have penetrated Gaziantep. In October, police, in two separate raids in Gaziantep Province, seized twenty-nine suicide vests, three hundred and thirty pounds of C-4 explosives, grenades and other explosives, and Kalashnikovs. Americans in Gaziantep have been warned that ISIS operatives are tracking the activities of Westerners. U.S. officials remain in the city only a few days, or even a few hours, as they carry out their missions. A senior State Department official who was visiting the city told me that if he came under attack there his only option would be to hide under his hotel bed.

This fall, U.S. officials came to Gaziantep to brief Americans working for nongovernment agencies. The advice was blunt: Keep a low profile. Don’t gather in groups in public places. Don’t wear sports or university insignia that would advertise nationality. Stay away from Starbucks.

“Gaziantep is a workaday city, not a cosmopolitan place, even though it’s prosperous,” a young employee of an American contractor based there told me. “Now it’s been thrust into this weird world spotlight—as if Oklahoma City were suddenly on the front line of some international conflict.”

One morning in late October, I drove from Gaziantep to the border overlooking Kobani, a Syrian town that ISIS has besieged since mid-September. Until then, the place was known mainly for its Ottoman-era train station, as a stop on the Berlin-Baghdad railway. Local lore claims that its name comes from the Germans who built the railway—from Kompanie, for “company,” or Bahn, for “train.” The town that grew around the station, of some forty thousand inhabitants, attracted Armenian Christians escaping genocide in the early nineteen-hundreds, and, later, ethnic Kurds.

Kobani’s railway line became a boundary in the 1916 Sykes-Picot Agreement, with which the British and the French secretly divvied up the Ottoman Empire during the First World War. Eventually, Kobani was allocated to what would become the new state of Syria, and everything to the north went to Turkey. The borders on the map were arbitrary then, and ISIS is determined to destroy them now. By taking Kobani, it could extend its proclaimed Islamic Caliphate right up to the Turkish border. The siege of a once-obscure town didn’t attract much attention until the United States launched its first air strikes, in late September, transforming what had been a footnote in the war into a test of American might against the jihadist onslaught.

On a rocky hilltop on the Turkish side of the border, photographers, journalists, and Syrian refugees often gather to watch as Kurdish fighters battle ISIS for control of the town, a few hundred yards below. I sat next to Hamid Muslim, an eighty-four-year-old Syrian Kurd. His cane lay beside him. The air around us was noisy with the buzz of warplanes, spy planes, and drones, mostly American, punctuated by bursts of automatic rifle fire and mortar explosions.

Hamid pointed with his cane toward the western part of Kobani, where he had lived and run a vegetable shop. “We closed the door and left everything behind,” he said. He had come to see what was still standing. Other refugees passed around an old pair of binoculars to check on their homes. Many were simple cinder-block buildings. The fighting, often house to house, even room to room, had caused vast destruction.