A multi-million pound deal to boost efforts to crack down on Islamist extremists in West Africa has been agreed between Britain and Nigeria.

Theresa May signed the agreement in the country’s capital Abuja while meeting its president, Muhammadu Buhari. It commits the UK to expanding its training and equipment to the Nigerian military as it fights the extremists of Boko Haram.

Downing Street hopes the assistance will also better protect the UK from terror threats while also saving the lives of soldiers and civilians living in Nigeria, Africa’s most populated country.

Boko Haram has killed more than 20,000 people and forced hundreds of thousands to flee their homes.

Mrs May faced questions about the decision to increase support despite Amnesty International raising allegations about Nigerian soldiers raping women rescued from Boko Haram.

The PM told reporters she had raised the issue of human rights with president Buhari, adding she welcomed his decision to establish an inquiry to examine the allegations.

The deal includes training to counter improvised explosive devices, £13 million to educate 100,000 children living in areas of conflict, developing the Nigerian government's procedures to respond to terror attacks, and aiding Nigeria in the propaganda war.

Nigerian army units will also be trained as a whole rather than individually by the UK before their deployment.

Attempts to help Nigeria recover stolen assets held in the UK and to reduce corruption will also be made via a new "civil asset recovery taskforce", Downing Street added.

Mrs May arrived in Nigeria on day two of her whistle-stop Africa tour with trade and efforts to combat people trafficking also on the agenda.

Rain started to fall as Mrs May left the RAF Voyager and after a military reception, she resisted the temptation to dance for a second day when greeted by dancers and drummers at the airport in Abuja.

She travelled to the presidential villa for talks with President Buhari, amid a chaotic media scrum on the red carpet.

The PM later travelled to Lagos to announce business projects, develop financial links amid post-Brexit uncertainty for the City of London, and meet survivors of modern slavery.

On the security and defence agreement, the PM said: "We are determined to work side-by-side with Nigeria to help them fight terrorism, reduce conflict, and lay the foundations for the future stability and prosperity that will benefit us all."

Mrs May arrived in Nigeria after making her pitch for the UK to help develop Africa, particularly in the post-Brexit world, and seize a greater share in the market amid fierce global competition from China, France and the United States.

On Thursday, the PM will be in Kenya on the final leg of her African tour.