"Officers and soldiers from the army and National Intelligence and Security Service, some of them retired, were trying to carry out a coup", General Jamal Omar of the ruling military council said in a statement broadcast live on state television.
"The attempted coup came in a critical time, ahead of the deal with the Forces for the Declaration of Freedom and Change", Omar said, referring to the coalition of political groups that speaks for the pro-democracy demonstrators.
Tension between the two sides had soared after the raid but following intense mediation by African Union and Ethiopian mediators a landmark power sharing deal was reached earlier this month that aims to set up a joint civilian-military governing body.
Gen Omar said that 12 serving officers and five retired officers have been arrested, as well as four non-commissioned officers.
Bashir was ousted by the army on April 11 after thousands of protesters camped outside the military headquarters in central Khartoum from April 6.
Labat, the AU envoy, and Mahmoud Dirir, Ethiopia's envoy, met with the military council. He did not release the names of those arrested, however he added that "others will be arrested, including the leader of the foiled coup attempt". Sudan has been rocked by a political crisis since protests first erupted against Bashir's rule in December.
Last week, the military and FDFC representatives announced that they had reached a power-sharing agreement amid robust African and worldwide pressure.
Security forces used barbed wire to block a main road leading to the Defence Ministry compound, the site of the protest camp crushed by security forces in June, a Reuters witness said.
The agreement reportedly stipulates that the new governing body will be presided over by a military nominee for the first 21 months, and the last 18 months by a civilian. The military also agreed to restore the internet after a week-long blackout.
The military council insists it did not order the raid, which according to the protest movement left more than 100 killed and hundreds wounded on that day. A committee of legal experts was assigned to draft the details before it would be handed over for both parties to sign.
The constitutional declaration's signing was pushed to Sunday for further consultations based on FFC's wishes, Lebatt said on Sky News Arabia earlier on Saturday.
General Mohamed Hamdan Dagalo, deputy head of the Transitional Military Council and head of the RSF, which controls Khartoum and whose members are accused of violently dispersing the sit-in outside the Defence Ministry, defended the latter's role in maintaining security.
Omar al-Bashir was President of Sudan from the June 1989 military coup until his own overthrow in April 2019.
"Counterrevolutionary forces represented in the old Islamist regime are very active now", she said.