British soldiers will be sent to Africa to help counter the threat of Islamist extremists in the region, David Cameron has said.
The Prime Minister said up to 300 soldiers will be deployed in South Sudan as part of a peace-keeping mission while a further 70 will be sent to Somalia to support attempts to defeat the terrorist group Al-Shabab.
Mr Cameron suggested that bringing stability to both countries could help ease the crisis that has led to hundreds of thousands of migrants crossing the Mediterranean to reach Europe.
And he said it was right Britain was "stepping up and playing a greater role".
All the troops sent to the region will be involved in peace-keeping efforts not active combat, with a focus on training, logistical support and engineering help.
It comes with Mr Cameron in New York to discuss with world leaders how to solve the refugee crisis and tackle world poverty at the United Nations General Assembly.
Mr Cameron said: "Our Armed Forces have a long history of delivering security and stability to some of the most difficult environments in the world, and I am proud to offer British support and expertise to peacekeeping operations in Somalia and South Sudan.
"As the world agrees ambitious goals to end extreme poverty, it is absolutely vital that the international community works together to shore up stability in Africa."
In South Sudan, troops will be dispatched in a series of rolling deployments to help a UN peace-keeping force of more than 12,000 there since 2013, when a fragile political settlement between the country's two main tribes descended into open warfare.
In Somalia, British soldiers will help assist an African Union peace-keeping force which has been attempting to drive back Al-Shabab, the Islamist radicals linked to Al-Qaeda. A dozen Ugandan soldiers fighting for the force was killed by the radicals earlier this month, raising fears for British troops' safety.
Speaking to reporters on a flight to New York, Mr Cameron said everything would be done to ensure troops deployed to the countries remained safe.
"Let me stress that obviously we will want to see all the right force protection arrangements to be in place. But we should be playing a part in this," he said.
"What happens in the outcome in Somalia, if it's a good outcome, that's good for Britain, it means less migration, less piracy and ditto South Sudan.
"If we can, as peacekeepers, help to maintain order and peace and see stable development in that country then that's going to be again less poverty, less migration, less issues that affect us back at home.
"So it's right that we're stepping up and playing a greater role. We're able to do this because of the resources that we have."
The new deployments will be in additional to the 280 British troops already participating in a UN mission in Cyprus.