After nearly 30 years in power, Sudan’s President Omar al-Bashir has been ousted and arrested, the defence minister says.
Speaking on state TV, Awad Ibn Ouf said the army had decided to oversee a two-year transitional period followed by elections.
He also said a three-month state of emergency was being put in place.
Protests against Mr Bashir, who has governed Sudan since 1989, have been under way for several months.
Meanwhile, the main group that has been organising the demonstrations called for them to continue on Thursday, despite the military intervention.
“I announce as minister of defence the toppling of the regime and detaining its chief in a secure place,” Mr Ibn Ouf said in a statement.
It is not clear where Mr Bashir is being held.
Mr Ibn Ouf said the country had been suffering from “poor management, corruption, and an absence of justice” and he apologised “for the killing and violence that took place”.
He said Sudan’s constitution was being suspended, border crossings were being shut until further notice and airspace was being closed for 24 hours.
As the news broke, crowds of protesters celebrated outside army headquarters in the capital, Khartoum, embracing soldiers and climbing on top of armoured vehicles.
Sudan’s intelligence service said it was freeing all political prisoners, state-run Suna news agency reported.
Mr Bashir is the subject of an international arrest warrant issued by the International Criminal Court (ICC), which accuses him of organising war crimes and crimes against humanity in Sudan’s western Darfur region.
However it is not clear what will happen to him following his arrest.
How did events unfold?
In the early hours of Thursday, military vehicles were seen entering the large compound in Khartoum that houses the defence ministry, the army headquarters and Mr Bashir’s personal residence, AFP news agency reported.
State TV and radio later interrupted their programming with a message that the army would be making a statement.
Meanwhile, tens of thousands of demonstrators marched through central Khartoum, some chanting “It has fallen, we won”.
Will this end the protests?
In a strongly worded statement, the main organisation behind the demonstrations, the Sudanese Professionals Association (SPA), said the military had announced a “coup” that would reproduce the same “faces and institutions that our great people revolted against”.
It urged people to continue the sit-in outside the military headquarters in Khartoum and to stay on the streets of cities across the country.
“Those who destroyed the country and killed the people are seeking to steal every drop of blood and sweat that the Sudanese people poured in their revolution that the shook the throne of tyranny,” the statement read.
The protests were originally sparked by a rise in the cost of living, but demonstrators then began calling for the president to resign and his government to go.