KHARTOUM — President Omar al-Bashir, who ruled Sudan with an iron fist for 30 years, was on Thursday overthrown in a coup by the armed forces which announced a two-year period of military rule to be followed by elections.

In an address on state television, Defence Minister Awad Mohamed Ahmed Ibn Auf said Bashir, 75, was under arrest in a "safe place" and a military council was now running the country.

Alaa Salah gestures during a protest demanding Sudanese President Omar Al-Bashir to step down along a bridge in Khartoum, Sudan April 8, 2019. Lana H. Haroun / via Reuters

Seated on a gold-upholstered armchair, Auf announced a three-month state of emergency, a nationwide ceasefire and the suspension of the constitution. He also said Sudan's air space would be closed for 24 hours and border crossings shut until further notice.

Sudanese sources told Reuters that Bashir was at the presidential residence under "heavy guard". A son of Sadiq al-Mahdi, the head of the country's main opposition Umma Party, told al-Hadath TV that Bashir was being held with "a number of leaders of the terrorist Muslim Brotherhood group".

Bashir has been indicted by the International Criminal Court in The Hague and is facing an arrest warrant over allegations of genocide in Sudan’s Darfur region during an insurgency that began in 2003 and led to death of an estimated 300,000 people.

The downfall of Bashir follows the toppling this month of Algerian strongman Abdelaziz Bouteflika, also following mass protests after three decades in power.

Names of Bashir's possible successors that have been circulating include the defense Minister, an ex-military intelligence chief, also an Islamist, and former army chief of staff Emad al-Din Adawi.

Adawi is said to be favored by regional neighbors at odds with Bashir over his Islamist leanings.

Thousands of people flocked to an anti-government protest outside the defense ministry on Thursday, while huge crowds took to the streets in central Khartoum, dancing and shouting anti-Bashir slogans. Protesters chanted: "It has fallen, we won."

Sudan's President Omar al-Bashir, center, sits with his Defence Minister Awad Ibnouf, left, and Prime Minister Mohamed Tahir Eila, right, at the presidential palace in Khartoum on March 14. Ashraf Shazly / AFP - Getty Images

Demonstrators called for a civilian government and said they would not accept an administration led by military and security figures, or by Bashir's aides.

Omar Saleh Sennar, a senior member of the Sudanese Professionals' Association, one of the main protest groups, said it expected to negotiate with the military over a transfer of power.

"We will only accept a transitional civilian government," Sennar said.

Kamal Omar, 38, another demonstrator, said: "We will continue our sit-in until we prevail."

Some demonstrators, who have rallied against Bashir since Dec. 19, said they feared the delay would allow him to go into exile.

Troops deployed around the defense ministry and on major roads and bridges in the capital.

Soldiers stormed the headquarters of Bashir's Islamic Movement, the main component of the ruling National Congress Party. Protesters also attacked the offices of Sudan's intelligence and security service in the eastern cities of Port Sudan and Kassala on Thursday, witnesses said.

The security service earlier announced the release of all political prisoners.

Bashir, a former paratrooper who seized power in a bloodless coup in 1989, has been a divisive figure who has managed his way through one internal crisis after another while withstanding attempts by the West to weaken him.

Sudanese men celebrate while rallying in the capital Khartoum on April 11. AFP - Getty Images

Sudan has suffered prolonged periods of isolation since 1993, when the United States added Bashir’s government to its list of terrorism sponsors for harboring Islamist militants. Washington followed up with sanctions four years later.

The latest crisis has escalated since the weekend, when thousands of demonstrators began camping out outside the defense ministry compound, where Bashir's residence is located.

Clashes erupted on Tuesday between soldiers trying to protect the protesters and intelligence and security personnel trying to disperse them. At least 11 people died, including six members of the armed forces, the information minister said, citing a police report.

Since December, Sudan has been rocked by persistent protests sparked by the government's attempt to raise the price of bread, and an economic crisis that has led to fuel and cash shortages