David Cameron warned that northern Africa is becoming a "magnet for jihadists" as he announced help to tackle the terror threat in the region.
The Prime Minister's comments came during a Commons statement on the Algeria gas plant attack.
It has been confirmed that three British hostages have been killed and a further three are believed to be dead.
Mr Cameron said Britain faces a "generational struggle" against extremism after Algeria and pledged support for the international effort to tackle the problem.
"Britain will contribute intelligence and counter-terrorism assets to an international effort to find and dismantle the network that planned and ordered the brutal assault at In Amenas".
Earlier, Algeria's Prime Minister, Abdelmalek Sellal, confirmed that 37 foreign hostages were killed during the four-day standoff with Islamist militants.
– Prime Minister David Cameron
We must frustrate the terrorists with our security, we must beat them militarily, we must address the poisonous narrative they feed on, we must close down the ungoverned space in which they thrive and we must deal with the grievances they use to garner support.
Mr Cameron also revealed that talks were taking place about offering extra support to the French military intervention in Mali, but stressed that British forces would not be involved in combat roles.
He said: "Our help for the French will be discussed again at the National Security Council tomorrow.
"We have lent them two C-17 (transport aircraft), we propose to continue with that and will be looking at other transport and surveillance assets that we can let the French use to help them in what they are doing."
The Labour leader Ed Miliband backed the Government's response to the Algeria attack, which he described as an "unimaginable nightmare" for those involved and their families.
He said his party would give its "full support" to both bringing those behind the terrorist outrage to justice and dealing with the wider issue of al-Qaeda-linked groups in the region.