The UK could take military action against Islamic State in Libya or Syria if there was an imminent threat to British lives, David Cameron indicated as he said the international community is increasing efforts to "put the squeeze" on the terror group.
The global struggle against the jihadis will be on the agenda in talks between the Prime Minister and Indonesian leader Joko Widodo - known as Jokowi - as Mr Cameron begins his tour of south-east Asia.
Fears have grown in recent weeks about IS's activities in Libya following reports that Seifeddine Rezgui, the gunman who carried out the Tunisian beach resort massacre, trained at a terror camp in the country.
The Prime Minister indicated he wanted to work with allies to establish a stable government in Libya.
"We should be working and are working with other partners to help the new Libyan government as it gets formed. So that's helping with advice and support and capacity-building in their government departments," he said.
"The problem in Libya has been they haven't had a government that has been able to deliver, and that should be our focus. That is why, for instance, we tried helping with training military personnel, so we should go on doing all of these things."
Although a military campaign is not being proposed by the UK against IS targets in Libya, Mr Cameron indicated he would be prepared to act if it was necessary in an emergency.
He said that "if there is a threat to Britain, to our people, our streets, and we are able to stop it by taking immediate action against that threat - I'm the British Prime Minister, I would always want to try and take that action and that's the case whether that problem is emanating from Libya, from Syria or anywhere else".
The threat posed by IS will be discussed with President Jokowi and later in the trip with Malaysian Prime Minister Najib Razak amid fears the group is seeking to establish a foothold in the region.
IS - also known as Isil - and other terror groups have been pumping out propaganda in local languages and their support is thought to be growing.
Around 500 people from Indonesia - which has the world's largest Muslim population - and 200 from Malaysia are thought to have joined IS in Iraq and Syria.
There are also fears about the release of Islamist terrorists locked up in Indonesia following the Bali bombing and, in a sign of the growing influence of the group, Indonesian extremist leader Abu Bakar Bashir has pledged allegiance to IS.
Speaking to reporters on the flight to Indonesia, Mr Cameron said counter-terrorism would be "a big agenda item" on the trip.
He said: "What can we do to co-operate together, what can we learn from moderate Muslim states like Indonesia and Malaysia, what can we help with in terms of counter-terrorism training and policing, how we can co-operate to keep our people safe?"
The Prime Minister held talks with Turkish counterpart Ahmet Davutoglu at the weekend and he welcomed Ankara's decision to take action against IS.
"I think it's good that Turkey is stepping up its action against Isil and Isil targets. I think there is more we can do in terms of co-operation on counter-terrorism, particularly stopping foreign fighters from going through Turkey into Syria.
"I think, frankly, what's happening is the pace is quickening and the pressure is growing on Isil. You see that from what the Turks are doing but also Britain is keeping up the pace as well in terms of what we are doing in Iraq.
"We are all working very closely together to put the squeeze on Isil and to restrict what it does.
"We have always said this needs to be degraded and then destroyed. That remains the goal."
Asked if he was worried that Turkish action against Kurdish separatists could add to the instability in the region, the Prime Minister said: "I think obviously we want the focus to be on Isil. I think it is important that Turkey has made these steps and we will encourage them to do that."
The Prime Minister's trade mission to south-east Asia will see business deals worth £750 million sealed as he seeks to boost economic ties with the developing nations.
Mr Cameron will become the first British prime minister to visit Vietnam during the four-day regional tour. He said south-east Asia is a "very important area" with "big opportunities for business and for investment".