boko haram chad soldiers
The military detained the two reporters after they allegedly loitered near areas where the government was carrying out an offensive against Boko Haram terrorists Emmanuel Braun/Reuters

Two Al Jazeera journalists have been detained by Nigerian military for "loitering" in areas where military operations are ongoing against Boko Haram terrorists.

The reporters, who went to Nigeria to cover the upcoming presidential election, have been held in the city of Maiduguri, capital of Borno state, since 24 March.

Al Jazeera said the journalists, Ahmed Idris and Ali Mustafa, were being kept in their hotel rooms until further notice and that their equipment had been confiscated.

Al Jazeera demanded the release of the reporters"without conditions".

"We call on the Nigerian authorities to release Ahmed Idris and Ali Mustafa; they have all the relevant paperwork to report on the Nigerian elections and stories related to the election", an Al Jazeera spokesman said in a statement.

"Both men had just finished filming a story on the military with their cooperation. Both men are accredited and respected Nigerian journalists", the statement continued.

Boko Haram, which fights against Western influence in Nigeria and aims to impose its version of Sharia law in the country, has killed thousands of people since its insurgence started in 2009.

As a result of their violent attacks, three states - Adamawa, Borno and Yobe - have been under a state of emergency since May 2013.

In February, the Nigerian army was joined by troops from Niger, Chad, Benin and Cameroon to help in the fight against the insurgents. Around 7,000 African Unions troops are also expected to be deployed.

The major offensive started shortly after current President Goodluck Jonathan postponed by six weeks the election amid security concerns as Boko Haram continued to carry out deadly attacks in the north east of the country. The election will take place on 28 March.

The offensive has regained several territories previously captured by the terrorists. However, experts have warned that violence is guaranteed during the election, as Boko Haram vowed to disrupt the polls.