Salah Abdallah Mohamed Saleh, known as Salah Gosh, who headed the National Intelligence and Security Service and was once the most influential person in the country after Bashir, was held responsible by protesters for the killing of demonstrators demanding an end to military rule.
Defense Minister Awad Ibn Auf stepped down as head of the transitional military council late on Friday after only a day in the post, as protesters demanded faster political change.
The new head of the military council, Lieutenant General Abdel Fattah al-Burhan Abdelrahman, accepted Gosh's resignation, state news agency SUNA said on Saturday.
Burhan is a military commander believed to be more ready to talk to the protesters.
He was the third most senior general in the Sudanese armed forces and is little known in public life. As head of Sudan’s ground forces he oversaw Sudanese troops fighting in the Saudi-led Yemen war and has close ties to senior Gulf military officials.
Celebrations erupted on the streets of Khartoum overnight following Ibn Auf's resignation. Thousands of protesters waved flags and illuminated mobile phones in the darkness and drivers hooted car horns. People chanted: "The second has fallen!" a reference to Ibn Auf and Bashir, witnesses said.
The Sudanese Professionals Association (SPA), which has been leading protests to demand a civilian government, called for more demonstrations on Saturday.
"Today, we continue the march to finish the victory for our victorious revolution," the SPA said in a statement.
"We assert that our revolution is continuing and will not retreat or deviate from its path until we achieve ... our people's legitimate demands of handing over power to a civilian government," it said.
DIALOGUE WITH DEMONSTRATORS
The military council said on Thursday it expected a pre-election transition to last two years at most or less if chaos could be avoided.
Bashir, 75, seized power in a 1989 military coup. He had faced 16 weeks of demonstrations brought on by rising food costs, high unemployment and increasing repression during his three decades in power.
The protests escalated last Saturday when thousands of demonstrators, apparently bolstered by change in Algeria following similar protests, marched towards the Defence Ministry in central Khartoum to deliver a memorandum demanding the military side with them.
Demonstrators have been camping outside the compound since then to push for a handover of power.
Worshippers packed the streets around the Defence Ministry for Friday prayers, heeding a call by the SPA to challenge the military council.
The numbers swelled in the afternoon and a Reuters witness estimated hundreds of thousands of protesters thronged areas around the ministry, which was guarded by soldiers.
At least 16 people were killed and 20 injured by stray bullets at protests and sit-ins on Thursday and Friday, a police spokesman said. Government buildings and private property were also attacked, spokesman Hashem Ali added.
He asked citizens to help ensure safety and public order.