MAIDUGURI, Nigeria (Reuters) - Islamist militant sect Boko Haram on Tuesday released a video purporting to show the execution of three men the group accused of being Nigerian military spies.

The seven-minute clip, the first online video posted in two years of an execution said to be by Boko Haram, showed three men wearing orange jumpsuits. One is decapitated by masked men while the other two are shot.

The masked men criticize President Muhammadu Buhari and Nigeria’s military campaign against Boko Haram’s eight-year long insurgency in the northeast of the country. The militant group has killed more than 15,000 people and forced more than 2 million to flee their homes.

“These are your boys you sent,” says one militant in a message aimed directly at Buhari, as the three men kneel on the ground.

Boko Haram aims to create a state that adheres to strict Islamic laws in the northeast of Africa’s most populous nation.

In December, Buhari said the group had been pushed out of its last enclave in the Sambisa forest. Days later, a militant who identified himself as Boko Haram leader Abubakar Shekau denied the government’s assertion.

Shekau did not appear in the latest video, narrated in a mixture of Arabic and the Hausa language spoken widely in northern Nigeria and sent to a number of media.

A Nigerian army spokesman gave no answer when asked by Reuters if the executed men were military intelligence officers as Boko Haram claimed.

“We are focusing on stabilization and consolidating our counter-terrorism and counter-insurgency operations,” army spokesman Sani Usman said in a text message.

“Let them mention that part of Nigerian territory they are holding,” he said.

In a separate development, the leader of Ansaru -- a splinter faction of Boko Haram -- and six others appeared in court on Tuesday to face charges of terrorism, murder, kidnapping and the illegal possession of firearms.

Khalid al-Barnawi, who was arrested last April, and the other defendants pleaded not guilty. The case was adjourned until April 11.

Nigeria has witnessed an increase in attacks or attempted attacks bearing the hallmarks of Boko Haram in crowded areas, such as markets and refugee camps, since the end of the rainy season in late 2016.

Most of the attacks have either been foiled or the suicide bombers have managed only to blow themselves up.