Obama and Erdogan (file)
Obama and Erdogan (file) Reuters

United States President Barack Obama and Turkish President Recep Tayyip Erdogan agreed in a telephone call on Wednesday night to work together to "stem the flow of foreign fighters and secure Turkey's border with Syria," the White House said in a statement, quoted by Reuters.

According to the statement, the two leaders also discussed deepening their cooperation in the fight against Islamic State, which has grabbed swaths of Syrian and Iraqi territory and declared a caliphate.

Thousands of foreign fighters have crossed through Turkey, a NATO member, to join ISIS over the past few years.

The conversation between Obama and Erdogan took place two days after a suicide attack in Turkey, in the town of Suruc near the border with Syria, killed 32 people.

It was the deadliest attack in Turkey since 2013, and if ISIS involvement is confirmed, would be the group's first suicide attack on Turkish soil.

The Turkish government has rejected accusations from the opposition that it has in the past tacitly supported ISIS jihadists operating from Syria and had unwittingly opened the door to the suicide bombing in Suruc.

Turkish authorities have cracked down on ISIS networks, arresting dozens of suspects in recent weeks, and the country beefed up its border with Syria with tanks and anti-aircraft missiles as well as additional troops.

The White House said Obama had condemned Monday's bombing.

"He conveyed condolences on behalf of the American people to the families of the victims, and the two leaders affirmed that the United States and Turkey stand united in the fight against terrorism," the statement said, according to Reuters.

It is unclear as of yet how Washington and Ankara will cooperate against ISIS. Turkey has hesitated to join the U.S.-led coalition conducting airstrikes against ISIS in Syria and Iraq.

American intelligence chief James Clapper recently said Turkey does not place a high priority on fighting ISIS, and added he was not optimistic that Turkey would take a more active role in the war against the jihadist group.