The Nigerian government says it has agreed a ceasefire with the Islamist militant group Boko Haram and is negotiating for the release of 219 schoolgirls kidnapped six months ago.

The deal would mark a huge breakthrough after a five-year insurgency by extremists seeking to create an Islamic state in the north of Africa’s most populous country. It has left thousands dead and a worldwide outcry was prompted when the girls were abducted in April from the north-eastern town of Chibok.

Members of the Bring Back Our Girls campaign tweeted: “We are monitoring the news with huge expectations.”

But questions surrounded the purported agreement on Friday. Similar claims from the government and military have failed to bear fruit. The Nigerian president, Goodluck Jonathan, is expected to declare that he is standing for re-election, and positive news about the hostages and insurgency could deflect criticism of his handling of the crisis.

Mike Omeri, a government spokesman, told a press conference in the capital, Abuja: “Already, the terrorists have announced a ceasefire in furtherance of their desire for peace. In this regard, the government of Nigeria has, in similar vein, declared a ceasefire.”

Omeri claimed that there had been direct negotiations this week about the release of the missing girls. Boko Haram negotiators “assured that the schoolgirls and all other people in their captivity are all alive and well”, he said.

The truce was announced on Friday by Nigeria’s chief of defence staff, Air Marshal Alex Badeh, who ordered his troops to comply immediately with the agreement. Boko Haram has not made a public statement.

The group had been demanding the release of detained extremists in exchange for the girls. Jonathan had said he could not countenance a prisoner swap.

The failure of Jonathan’s government to rescue the girls has prompted an international campaign and daily Bring Back Our Girls rallies in Abuja to highlight the girls’ plight. There was further anger when posters calling for Jonathan’s re-election in February by using the hashtag BringBackGoodluck2015 appeared until he ordered them to be torn down.

In July, Jonathan met for the first time parents of the girls and dozens of classmates who managed to escape. It followed months of controversy in which the parents had sought a meeting. He finally agreed to the meeting after a request from Malala Yousafzai, the 17-year-old Pakistani schoolgirl who was shot by Taliban militants in 2012 and won the Nobel peace prize this month for her campaigning for girls’ right to an education.

Jonathan’s principal secretary, Hassan Tukur, told Agence France-Presse on Friday that an agreement to end hostilities had been reached following talks, as well as a deal to release the 219 girls.

Tukur said he had represented the government at two meetings with the Islamist extremists in neighbouring Chad, mediated by that country’s president, Idriss Déby. “Boko Haram issued the ceasefire as a result of the discussions we have been having with them,” said Tukur. “They have agreed to release the Chibok girls,” he added.

But there was uncertainty about the identity of Boko Haram’s representative at the talks, named by Tukur as Danladi Ahmadu.

Multiple analysts cast doubt on Ahmadu’s credibility as a Boko Haram envoy. Shehu Sani, a Boko Haram expert who has negotiated with the group before on behalf of the government, told AFP: “I have never heard of such a man, and if Boko Haram wanted to declare a ceasefire, it would come from the group’s leader, Abubakar Shekau.”

Ralph Bello-Fadile, an assistant to Nigeria’s national security adviser (NSA), told a conference on Monday that it had been inundated with fraudsters claiming to represent Shekau. “Government wants to negotiate, but so far nobody has come forward who speaks for Shekau,” he told a Chatham House event in Abuja.

Ahmadu gave an interview broadcast on Friday yesterday on the Hausa language service of Voice of America radio in which he claimed to be the group’s chief security officer and in charge of publicity. He made no mention of an end to hostilities and was vague on details of the apparent talks, even claiming not to have met Shekau.

He also referred to the jihadi group as Boko Haram, a name that means “western education is forbidden”. The name was imposed on the Islamist radicals by outsiders – the insurgents themselves never use the term. Their leaders have exclusively used the name Jama’atu Ahlis Sunna Lidda’awati wal-Jihad, which means “People Committed to the Propagation of the Prophet’s Teachings and Jihad”.

Boko Haram stormed the school in Chibok in April and snatched nearly 300 students, of whom 219 remain in captivity. This week about 50 protesters in red shirts tried to march to the presidential villa but were repeatedly diverted by riot police. The president has blamed activists for politicising the abductions and influencing the parents.