British Prime Minister David Cameron will head to Algeria on Wednesday for a two-day visit in the wake of the hostage crisis that left some 37 foreigners dead including several Britons, his office confirmed.

Cameron is expected to meet with his Algerian counterpart Abdelmalek Sellal as well as President Abdelaziz Bouteflika, Downing Street said Tuesday.

"The prime minister will be travelling out tomorrow for a two-day visit to Algeria," a spokesman told AFP. "He will hold bilateral meetings with the Algerian government, then travel on to Liberia."

The British premier is due to co-chair an international development conference in Liberia's capital Monrovia on Friday.

According to preliminary estimates by the Algerian authorities, 37 foreign hostages and 29 kidnappers died when gunmen stormed the In Amenas gas plant and the Algerian army launched a military assault in response.

Cameron and other world leaders protested that they were not notified in advance about the army operation at the remote site deep in the Algerian desert.

Four Britons were confirmed killed at the plant, which is partly operated by the British energy giant BP, while another two are believed dead.

The hostage-takers had demanded the release of Islamist prisoners and an end to France's operation against Islamist rebels in neighbouring Mali.

The British government's criticism of the raid tapered off however and Cameron eventually praised the "resolve" shown by the authorities in Algeria, which supplies around a quarter of Europe's natural gas.

Cameron's talks with Algerian leaders are likely to touch on the operation in Mali as well as the growing threat from extremists in north Africa.

The British premier has said the region is becoming a "magnet" for jihadists from other countries, and has pledged to use Britain's chairmanship of the Group of Eight richest nations this year to focus on the threat of terrorism.

"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," he told parliament this month.

On Tuesday, Britain offered to send up to 240 military experts to help train the Malian army as well as west African troops set to be deployed there, although it has stressed that it is not sending combat troops.