Addressing a joint press conference in Ankara, Davutoglu clarified Turkey's policy regarding passage of militants through its borders.
"Turkey has never and will never tolerate the transit of foreign fighters via Turkish soil or their presence in Syria," the Turkish prime minister said.
Cameron, who arrived in Ankara Tuesday evening, called for more intelligence sharing between the two countries to block the flow of foreign fighters, including British citizens into Syria to fight alongside the ISIL.
"We should exchange more information, we should cooperate more in terms of intelligence," Cameron said.
The British premier highlighted the danger that the foreign fighters posed for the U.K., and said the fighters "threaten us back at home" and everything should be done in their power to deal with the threat.
"We should work hand in glove because the people who are travelling, whether from Britain or elsewhere, sometimes from Turkey to Syria and Iraq, these are people that threaten us back at home and so, we should do everything that we can," he said.
A report released in October by the International Centre for the Study of Radicalization at King’s College, London, said that 23 British fighters had been killed in Syria and Iraq.
The British government claims that up to 500 Britons have traveled abroad to take part in fighting in Syria, and that at least 218 had returned to the U.K.
"We agree on this threat of ISIL, Daesh, whatever you call it, where it is come from. It has come from an Iraqi regime that was incapable of representing its entire people; it has come from a Syrian that was brutalizing its own people. It has come from the extremist ideology that drives this organization. We have to deal with all of these three issues," Cameron said.
The British prime minister also stressed that Turkey and the U.K. were fighting a common enemy.
"Whether it is about stopping people coming through Turkey to Syria or Iraq to fight for ISIL, whether it is about making sure we deal with people when they return; whether it is the highest level of intelligence cooperation that we can possibly achieve between our countries. This is all about making sure people are safer in Turkey and in U.K. We are already strong and should get stronger," Cameron added.
Davutoglu agreed and said, "Turkey's position is clear: We don’t want to see foreign fighters, neither in Syria nor in Iraq."
The Turkish premier said there was a need to develop a comprehensive strategy against the ISIL terrorists to prevent any similar militant groups from flourishing in the region.
"It is an obligation for us all to cooperate against the ISIL as it threatens not only the region and the country, but also the international community," Davutoglu added.
Cameron said he wanted to come to Turkey also because he thought it was clear for the people in Britain that “our economic security and our national security are very much highly linked with having a good relationship with Turkey.”
He said he shared Turkey's long-term strategy on Syria and Iraq. About the kind of governments he wanted to see in the region, he said, "We need to see governments that can represent all of their people, whether it is Sunni or Shia or Kurd."
Cameron also said that the U.K. like Turkey wanted "a political transition in Syria."
"We want to see a political transition in Syria, we want to see a different government in Syria, the one that is capable of representing all the people of Syria," Cameron said.
He also spoke about helping Syrian refugees.
“It is important, particularly in this time of the year when the weather is so cold, we make sure we look after those people and give them a good future," the British premier added.
Cameron’s visit to Turkey comes weeks after he said Britain had to take action to deal with the threat posed by “foreign fighters planning attacks against our people."
Cameron’s visit coincided with that of Federica Mogherini, the High Representative of the EU for Foreign Affairs and Security Policy, who visited a refugee camp on Turkey’s southern border Tuesday.
Later, the British premier met with Turkish President Recep Tayyip Erdogan.