Amnesty International says Nigeria's President Muhammadu Buhari has failed to prosecute soldiers who killed hundreds of detainees, despite promises to end impunity.

The London-based organization says Buhari should "take urgent action," starting with the soldiers who slaughtered 640 suspects on March 14, 2014, after a Boko Haram attack on Giwa Barracks in northeastern Maiduguri city.

Amnesty International documented the killings, verified video showing them and used satellite imagery to identify the locations of mass graves.

Amnesty last year found the military had executed at least 1,200 men and boys between 2012 and 2014 and was responsible for the deaths in custody of another 7,000 through torture, starvation, thirst and lack of medical care.