Turkey is struggling to close a « jihadist highway » that lets foreign militants slip across its border into Syria, amid pressure from Western governments and mounting security fears at home.

Turkish forces have stepped up arrests, patrols and interrogations in recent months, but the rapid advance of Islamic State extremists in Iraq has made Ankara’s initiative even more urgent, say Turkish officials, Western diplomats and residents.

On Wednesday, President Barack Obama signaled an expansion of American aims in the effort to halt Islamic State, saying the U.S. would « degrade and destroy » the extremist group and turn it into « a manageable problem » with the help of international partners.

Turkey became the primary route for foreign jihadists to join Syria’s civil war because of the country’s easy visa policies for travel, its porous 565-mile border with Syria and its modern transportation infrastructure.

Ankara, which grew hostile to Syrian President Bashar al-Assad after his deadly crackdown on protesters in 2011, also allowed foreign militants who sought to oust him to freely operate, diplomats say. Ankara has denied turning a blind eye to their presence.

With Turkey’s latest policy shift, long-bearded militants once seen openly traveling to battle or receiving medical treatment here in the leafy border villages of Turkey’s Hatay province have begun keeping a lower profile, residents and officials say. They are shaving their beards, trading their baggy trousers and tunics for Western clothing and flying into tourism hubs on Turkey’s Mediterranean coast rather than directly to Syria’s border. Other fighters sneak into Syria through Lebanon and Jordan.

Limiting Turkey’s ability to overtly crack down on jihadists is the Islamic State’s June kidnapping of 49 Turkish diplomats and their families in Mosul, Iraq, U.S. officials and people close to the Turkish government say. Turkish officials declined to comment on the hostages’ status after the government in June banned domestic media from reporting on the issue.

American and European officials have for two years repeatedly urged Turkey’s government to tighten its border policy and to be more discriminating over which rebel factions they were helping, diplomats say.

In response, Turkish officials have complained that their Western partners have failed to provide adequate intelligence on suspects, hindering Turkey’s effort.

Still, in recent months, Ankara has moved more forcefully to shut down what many observers call the « jihadist highway » after reassessing the threat from Islamic State, the diplomats say. In the eight months through August, Turkey detained or deported more than 450 foreign fighters, according to the Foreign Ministry — sometimes entire busloads of would-be fighters — more than double the 2013 total.

Turkish security forces have also launched operations to choke off smuggling routes that have helped fighters reach the battlefield and provided a market for Islamic State to sell oil from the territories it controls across the frontier.

« There has been a clear shift in policy after Turkey turned a blind eye to those crossing to Syria since 2011, » said Sinan Ulgen, a former Turkish diplomat who chairs the Center for Economics and Foreign Policy Studies in Istanbul.

Turkey’s effort follows the rapid and brutal advance of Islamic State in its effort to establish a self-styled Islamist nation in the Arab world’s heart and on Turkey’s southern frontier.

Islamic State’s growth has prompted Ankara and its Western allies to step up intelligence sharing and security cooperation.

Their tactics were spotlighted last month by the beheading of American journalist James Foley, his killer’s London accent apparently identifying him as one of an estimated 500 Britons believed to have joined the jihadists. The group on Tuesday released a video showing the beheading of a second American journalist, Steven Sotloff.

But Ankara concedes that its intensified efforts aren’t airtight, with these Turkish borderlands remaining a way station for aspiring militant fighters and exposing Turkey to potential Islamic State attacks. Some fighters are using the daily Syrian refugee flows across the border as camouflage.

« The border security has been increased, but the border cannot be taken under control only by military and police measures, » Lutfu Savas, Antakya’s mayor said on Wednesday. « It’s not just the ISIS, there are many illegal groups here in Hatay and other provinces. These groups have within the past couple of years learned the border geography better than we now do. »

Thousands of foreign fighters from countries including Turkey, Britain, Europe and the U.S. have joined Islamic State’s ranks in its self-proclaimed caliphate, say Western diplomats and Turkish officials.

The vast majority hail from Saudi Arabia and North Africa, according to Turkish and Saudi officials. The countries are concerned the jihadists will return to their home countries to wreak havoc.

Turkish officials say that makes it even more important for Western nations to provide names and data on suspects so Ankara can stop them at airports of entry rather than the far more difficult task of trying to locate people along the border with Syria.

Evidence of Ankara’s recently stepped-up efforts can be seen at strategic points along Turkey’s meandering border with Syria. Turkish police now confront and question men at Hatay Airport, especially targeting those arriving by direct flights from Saudi Arabia, witnesses say.

Turkey requires no visas for travelers coming for short holidays from Middle Eastern countries and the European Union.

Scrutiny has increased at Turkey’s busiest border gates, Cilvegozu in Hatay province and Oncupinar in neighboring Gaziantep province, the most-used crossing to reach Aleppo, Syria’s largest city and the site of several rebel bands including Islamic State.