Graphic new video footage from northeastern Nigeria shows the country’s military carrying out abuses against civilians as part of their fight against the Islamic extremists of Boko Haram, Amnesty International says.

One of the videos shows military personnel and civilian vigilantes calling five detainees from a row of 16 young men and boys, and then slitting their throats one by one before dumping the bodies into an open mass grave.

The international human rights group described the civilian vigilantes as ‘‘state-sponsored militias".

The Amnesty allegations back up earlier reports by The Associated Press that human rights abuses are being committed by all sides in Nigeria. Nigerian authorities have rejected past accusations, insisting the military follows international best practice in its fight against the group.

The Nigerian military is studying the video footage ‘‘with a view to identifying those behind such acts,’’ said Defence Headquarters spokesman Chris Olukolade in an emailed response. He added there will be ‘‘legal action against any personnel or anyone found culpable.’’

Amnesty said it obtained the footage from ‘‘numerous sources’’ in Borno state, the group’s birthplace and stronghold. The footage reveals ‘‘graphic evidence of multiple war crimes being carried out in Nigeria,’’ according to Amnesty. The group said it independently confirmed from several military sources that the armed captors in the footage ‘‘were indeed military personnel’’.

More than 4000 people — mostly civilians — have been killed this year alone ‘‘by all sides’’ of the conflict, said Amnesty. This compares to an estimated 3600 people killed in the first four years of the Islamic extremist insurgency.

The video footage is ‘‘proof of the appalling crimes being committed with abandon by all sides in the conflict,’’ said Salil Shetty, Amnesty International’s Secretary General.

‘‘Nigerians deserve better — what does it say when members of the military carry out such unspeakable acts and capture the images on film?’’ Shetty said.

Amnesty said the videos are supported by numerous testimonies that suggest that extrajudicial executions are regularly carried out by the Nigerian military and the civilian militia.

Some of the footage was apparently taken on March 14, the same day that Boko Haram broke into a military detention center in Giwa barracks, freeing hundreds of prisoners. Amnesty says the military recaptured more than 600 of these prisoners and killed them.

Boko Haram wants to enforce an Islamic state in Nigeria, whose population of more than 170 million people is almost evenly divided between a mainly Muslim north and largely Christian south.

Nigeria’s fight against the extremist group began in 2009 but took the international spotlight in mid-April when the militants kidnapped more than 200 schoolgirls, who still remain captive.

The insurgents have increased the number and deadliness of their attacks this year, particularly in their stronghold in the northeast. They also have detonated bombs as far away as Lagos, the commercial capital in Nigeria’s southwest.