Sudan's President Omar al Bashir has been ousted and arrested by the army, according to the country's defence minister.
Awad Mohamed Ahmed Ibn Auf said Mr Bashir - who seized power in a coup of his own in 1989 - had been detained "in a safe place" and that a military council would run the country for the next two years.
In a statement broadcast on state TV, he declared a state of emergency for three months and said "free and fair" elections would be held at the end of the 24-month transitional period.
He also announced a curfew for a month between 10.00pm and 4.00am and that Sudan airspace would be closed for 24 hours and all points of entry into the country until further notice.
Mr Bashir (75), who had previously survived several armed rebellions, is believed to be under house arrest with several aides at the presidential palace - along with a number of Muslim Brotherhood leaders.
In January the autocratic leader had warned the "rats to go back to their holes" and said he would step down only for another army officer or at the ballot box.
"They said they want the army to take power. That's no problem. If someone comes in wearing khaki, we have no objection," he said at the time.
The move to topple him from power comes after months of anti-government protests against his 30-year rule, in anger over a struggling economy.
But the military action was immediately dismissed by some of those who had been calling for Mr Bashir's removal.
Organisers of a sit-in outside the defence ministry since the weekend had vowed to remain in the streets until "the regime steps down completely and power is handed to a civilian transitional government".
The Sudanese Professionals' Association, which has been spearheading the protests, rejected the defence minister's statement and called on protesters to maintain the sit-in and continue their rallies.
"We are not leaving. We urge the revolutionaries not to leave the sit-in," the association said, warning against attempts to "reproduce the old regime".
The mood among protesters who earlier celebrated Mr Bashir's expected departure had turned to anger, and many chanted, "Fall, again!"
Activist Alaa Salah, who had condemned him as a "tyrant" president on his way out, tweeted: "The people do not want a transitional military council.
"Change will not happen with Bashir's entire regime hoodwinking Sudanese civilians through a military coup.
"We want a civilian council to head the transition. #Sudan."
A photo of the 22-year-old architecture student dressed in white, out on the streets on Monday, has come to symbolise Sudan's protest movement.
She also tweeted she had received death threats since the image and a video of her went viral on social media, but added: "I will not bow down. My voice cannot be suppressed."
In the run-up to the live military broadcast, footage showed tanks and military armoured vehicles on the streets, while witnesses said soldiers had been deployed to key sites across the capital Khartoum.
Sudan's state security agency announced the release of all political prisoners across the country, but did not say when.
The news was followed by reports of protesters attacking the agency's offices in the eastern cities of Port Sudan and Kassala.
Sudan's state TV had announced early on Thursday morning that the military was preparing to make an "important" announcement.
Tens of thousands of jubilant Sudanese, including women carrying their children, were seen marching towards the military headquarters in Khartoum waving the national flag, singing and clapping in anticipation of the news that Mr Bashir had been removed from office.