Sudan's President Omar al-Bashir was ousted from his post and arrested, while a three-month state of emergency was declared in the country, Defense Minister Awad Mohamed Ahmed Ibn Aufsaid said.
In a statement broadcast on state TV, he said a military council would run the country for a two-year transitional period with elections held after it is completed.
The minister also announced the closure of airspace, airports and other points of entry to Sudan, adding that the airspace would be closed for 24 hours, while land crossing would remain shut until further notice.
The coup to replace the president of 30 years followed mass street protests against his rule.
The two officials, who hold high positions in the government and the military, said the army was now in talks about forming a transitional government. The officials spoke to The Associated Press on condition of anonymity because they were not authorized to talk to the media.
Eyewitnesses in Khartoum said the military had deployed at key sites in the city to secure several installations since the morning hours.
A team of Sudanese soldiers raided the offices of a group linked to Bashir's ruling National Congress Party in Khartoum, witnesses said.
The soldiers raided the offices of the Islamic Movement, the ideological wing of the NCP, on Thursday morning, witnesses told AFP.
Armored vehicles and tanks are parked in the streets and near bridges over the Nile River, they said, as well as in the vicinity of the military headquarters, where thousands were anxiously awaiting the army statement. The witnesses spoke on condition of anonymity, fearing reprisals.
Organizers of the protests urged crowds to converge and join an ongoing sit-in underway in Khartoum since the weekend. They issued a statement vowing to remain in the streets until the "regime steps down completely and power is handed to a civilian transitional government."
Thousands of protesters, including women carrying their children, were making their way toward the military headquarters, clapping and ululating, many flashing "V" for victory. There were also unconfirmed reports that the airport in the Sudanese capital had been closed.
Ahead of the expected army statement, Sudanese radio played military marches and patriotic music. State TV ceased regular broadcasts, with only the brief announcement saying that there will be an "important statement from the armed forces after a while, wait for it."
The development followed deadly clashes between Sudanese security forces and protesters holding a large anti-government sit-in outside the military's headquarters in Khartoum, which also include a presidential residence. There were several attempts to break up the sit-in, leaving 22 dead since Saturday.
On Tuesday, Sudanese security forces tried again to disperse the sit-in, which began over the weekend, killing at least 14 people, activists behind the demonstration said. The government said 11 died. The fatalities so far have included five soldiers who protest organizers said were defending the sit-in.
The months of protests have plunged Sudan into its worst crisis in years. The demonstrations initially erupted last December with rallies against a spiraling economy, but quickly escalated into calls for an end to embattled al-Bashir's rule.
Security forces have responded to the protest movement with a fierce crackdown, killing dozens. Al-Bashir banned unauthorized public gatherings and granted sweeping powers to the police since imposing a state of emergency last month. Security forces have used tear gas, rubber bullets, live ammunition and batons against demonstrators
The protests gained momentum last week after Algeria's President Abdelaziz Bouteflika, in power for 20 years, resigned in response to weeks of similar protests.
On Saturday, marches in Khartoum marked the 34th anniversary of the overthrow of former President al-Nimeiri in a bloodless coup. It was one of the largest turnouts in the current wave of unrest.
The military removed Nimeiri after a popular uprising in 1985. It quickly handed over power to an elected government. The dysfunctional administration lasted only a few years until al-Bashir -- a career army officer -- allied with Islamist hard-liners and toppled it in a coup in 1989.
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.
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 militants. Washington followed up with sanctions four years later.
Bashir has also been indicted by the International Criminal Court (ICC) in The Hague over allegations of genocide in Sudan's Darfur region during an insurgency that began in 2003.
The latest crisis has escalated since the weekend when thousands of demonstrators began
Opposition figures have called for the military to help negotiate an end to Bashir's nearly three decades in power and a transition to democracy.
The demonstrators at the Defense Ministry had said that they wanted to submit a petition for the armed forces to take their side in their attempt to remove Bashir and his administration.