Four prisoners have been hanged in southern Nigeria, on a day of executions that have divided government figures. Four men, Chima Ejiofor, Daniel Nsofor, Osarenmwinda Aiguokhan and Richard Igagu, were hanged at Benin City prison after a court had ordered their executions on Monday afternoon.

Henry Idahagbon, the attorney general in Edo state, which carried out the executions, said a fifth man, who cannot be named because his family has not been informed of his impending execution, is due to be executed by firing squad. But the attorney general said that he was against the death penalty and that the state had chosen to flout a voluntary moratorium under which no executions have been carried out in Nigeria for seven years.

"I'm personally against corporal punishment and I don't believe it's a practical deterrent," Idahagbon said. "The state is aware of the moratorium in place. But it's not legally obliged to follow it."

Despite the moratorium, President Goodluck Jonathan recently called for more death warrants to be signed, "no matter how painful", according to reports in the Nigerian press.

Nigeria has 970 prisoners who have been convicted of the death penalty, including 19 women, but signing death warrants – which falls on state governors – has only been done in two states since the country's return to democracy in 1999.

Although an appeal court upheld the sentences shortly before the executions took place, campaign groups said that all appeals for the prisoners had not been exhausted, a violation of both Nigerian and international law.

"[We] filed an appeal against the judgment of the federal high court delivered today and also a motion for stay of execution pending the outcome of the appeal," said Chino Obiagwu, national co-ordinator of the Legal Defence and Assistance Project.

"Furthermore, all death-row prisoners filed a case pending at the court of appeal [in] Lagos challenging the decision of state governors to sign their execution warrants.

"Under the Nigerian laws, an appeal and application for stay of execution should restrain further action until the appeal is determined," Obiagwu added. "By executing the prisoners, Nigeria's government has demonstrated gross disregard to the rule of law and respect for the judicial process."

Amnesty International said that the authorities had breached the rules: "Executions are not supposed to be carried out in secret, without informing the families and the prisoners," said Lucy Freeman, Amnesty's deputy director for Africa. "The Nigerian authorities did not tell them what was happening. They didn't even know that the warrants had been signed."

In 2006, a number of prisoners were executed, including Auwalu Musa and Kenneth Ekhone, two men convicted by a robbery and firearms tribunal who did not have a lawyer and were not given the right to appeal.

Jonathan and other high-profile figures in Nigeria have called for executions as a way of clearing up prison spaces in Nigeria's severely overcrowded prisons.

"Governors talk periodically about resuming executions to decongest the prisons, but 80% of prisoners are awaiting trial, so it doesn't make any sense at all," said Freeman. "Executing four people does not decongest the prisons. It's bizarre."

• This article was amended on 16 July 2013. An earlier version attributed remarks about the hangings to Nigeria's federal attorney general, Mohammed Bello Adoke. It was the Edo state attorney general, Henry Idahagbon, who made the comments.