Boko Haram posted a video showing two men who were beheaded after they were accused of spying on the Nigerian Islamist militants.

The victims are shown being dragged before masked gunmen in the six-minute video "Harvest of Spies." The outdoor video, which could not be independently verified, was posted on Twitter. Some of the dialogue was translated in to French and English subtitles from the local Hausa language.

Nigeria's security forces are stepping up an offensive against Boko Haram ahead of the March 28 presidential elections. The group, whose name means "Western education is a sin" in Hausa, is holding towns and villages in the country's northeast as part of a self-declared caliphate. The militants have extended their six-year insurgency in Africa's top oil-producing nation to neighboring Chad, Cameroon and Niger.

One of the hostages in the video identifies himself as a farmer from Baga who received money from a police officer to give information about Boko Haram.