British soldiers have been deployed to the African jungle to help to stop elephant poachers that fund Islamist extremism.

Thousands of the animals have been slaughtered in the rainforests of Gabon and their ivory sold to raise money for Islamic State-linked jihadists.

More than a dozen soldiers from 2nd Battalion The Rifles were sent to the West African nation last month to train rangers, or 'eco guards', in skills such as intelligence and patrolling.

British soldiers have been training 'eco guards' and their managers at a camp in Lope National Park. Pictured: A pile of poached ivory is prepared for burning by the government to show their commitment to combat poaching

The mission, funded by the Department for Environment, Food and Rural Affairs, is one of several UK troop deployments across Africa helping to stamp out extremism amid fears it is becoming a haven for terrorists.

Major Simon Swindells, 30, speaking from Lope National Park, central Gabon, said: 'The UK Government has agreed to ban the sale of ivory. This is about dealing with the issue at source.'

Hubert Ella Ekogha, technical director for national parks in Gabon, said: 'We are fighting in a war. We are facing bad guys who have AK47s or big rifles like .458s.'

Poachers enter Gabon in gangs of up to 15 from countries such as Cameroon and Chad. They spend weeks in the jungle hunting elephants, whose tusks they hack off with axes or chainsaws.

They then flee back over the border and the ivory is sold on the black market to buyers from Asia. Intelligence suggests some of the profits go to the IS-linked terror group Boko Haram in Nigeria.

Mr Ekogha, whose father was head of Gabon's military until his death two years ago, said tackling poaching would ultimately stop terror attacks in the UK and other countries by disrupting jihadists' funding. He added: 'We can wait for terrorists to carry out bad acts like in the US in 2001 or we can solve the issue at the beginning. If we start to fight these guys at the beginning of the chain we will have more results.'

British soldiers have been deployed to the African jungle to help to stop elephant poachers. Pictured: Rangers of the Gabon national park find an elephant that has been poached for it's tusks

British soldiers train eco guards and their managers at a camp in Lope National Park. Once they have finished their five-week training, they are sent to parks across the country.

Most of the British unit returned from Al Asad air base in Iraq in January where they were training Iraqis in how to combat IS militants.

Captain Rob Prince, 27, speaking from the park, said: 'The Ministry of Defence doesn't just fulfil traditional defence roles.

'It is certainly an argument that the ivory trade underpins an illicit economy that has various manifestations across Africa. There is not just a wildlife element – this underpins national security.'

A British rifleman from the 2nd battalion The Rifles regiment has a quiet word with a National park ranger from Gabon before they head out for an exercise

Lance Corporal Andy Whicker talks with National park rangers from Gabon in west Africa during an anti poaching training exercise in the Lope national park

He added the training was 'really important' for the rangers, 'teaching them how to patrol, enhancing their jungle navigation based on our infantry training and enhancing their planning skills'.

Professor Lee White, the British-born head of Gabon's national parks who has been dubbed the 'real-life Tarzan', said: 'The kingpins in the ivory trafficking networks rarely come from Gabon. They are based in Nigeria and are feeding money into Boko Haram.'

He added there were 'gun battles' every month in the north of Gabon, increasing the need for training from UK troops.

Gabon loses up to 5,000 forest elephants a year from poaching and the illegal ivory trade there is worth around £11million a year. There are around 40,000 to 45,000 of the animals left in the country, accounting for more than half of Africa's forest elephants.

Defence Secretary Gavin Williamson said: ‘British troops are helping brave park rangers halt the barbaric slaughter of these majestic elephants by gangs chasing profit. ‘Britain is at the forefront of tackling this horrific trade, which can often be exploited to fund organised crime and terrorism and so threatens us all.’