LAGOS, Nigeria (AP) _ Nigeria's military government ordered the immediate release of hundreds of prisoners Wednesday, including at least 400 people imprisoned under the late military ruler Gen. Sani Abacha.

All of those to be freed had been held without trial or jailed even though they had served out their prison sentences, the government said in a statement.

The identities of the detainees were unclear and it was not certain whether they had returned to their homes Wednesday night. They were being held in jails across this West African country.

The government said the decision to release the detainees was intended to ``decongest the prisons and ... defend the freedom and basic right of individuals.''

Many of the prisoners had earlier appealed to the country's new military leader, Gen. Abdulsalam Abubakar, to review detentions handed down by Abacha, who died suddenly of a heart attack in early June.

Abubakar has freed several dozen political prisoners, including several prominent activists and opposition politicians.

But the country's most prominent detainee, Moshood Abiola, died of apparent heart failure in detention last week. The death is being investigated by Western doctors.

Since taking over, Abubakar has vowed to bring true civilian rule to Nigeria.

Abacha ruled Nigeria with an iron fist after taking power following a 1993 coup. Nigeria has been under military governments for all but 10 of 38 years since independence from former colonial power, Britain.

Earlier Wednesday, a Nigerian newspaper reported that the government plans to annul legislative elections held under Abacha.

Legislators have been told to prepare for new elections, the Lagos Press reported.

The country's new military leader, meanwhile, dissolved three agencies Abacha had established to oversee a transition to civilian rule. The agencies had long been viewed with suspicion by Nigeria's opposition movement, and were staffed largely with Abacha's friends and allies.

Abubakar is expected to announce his transition plans sometime this week.