Wednesday's competing rallies in the capital followed weeks of angry street protests over a government decision to triple the price of bread at a time when the country faces an acute shortage of foreign currency and soaring inflation.
Hundreds of protesters who have repeatedly called on Bashir to step down marched in the capital's twin city of Omdurman chanting "freedom, peace, justice" and "revolution is the people's choice".
But they were quickly confronted with tear gas fired by riot police. Videos posted on social media that could not be independently verified showed some demonstrators pelting police officers with rocks.
On Thursday, police confirmed that three protesters had died in the Omdurman demonstration but did not specify the cause of death.
"An illegal gathering was held in Omdurman and police dispersed it with tear gas," police spokesman Hashim Abdelrahim said in a statement.
"Police later received reports that three protesters had died and several (were) injured. We are now investigating." That raised the total death toll in protests so far to 22 including two security personnel, according to official figures.
New York-based Human Rights Watch said on Monday that at least 40 people including children had been killed in the unrest, citing Sudanese activists and medical workers.
A doctor told AFP late on Wednesday that six protesters were being treated at Omdurman's main hospital for gunshot wounds.
A group of doctors at the hospital said that police fired tear gas at the facility.
"There was also shooting inside the hospital," the group said in a statement, without specifying who had opened fire.
On Thursday, governor of Khartoum Hasim Osman set up a committee to investigate the incidents at the hospital, his office said in a statement.
Bashir and others have blamed violence at the nearly month-long protests on "thugs" and "conspirators" without naming them.
Wednesday's demonstration came soon after thousands of people danced and cheered Bashir at a separate rally held in the capital's Green Yard as police officers, soldiers and security agents secured the site.
"This gathering sends a message to those who think that Sudan will become like other countries that have been destroyed," Bashir told the crowd.
"We will stop anyone who destroys our properties." Crowds chanted
"Allahu akbar" (God is greatest) and "Yes, yes, Bashir, we will follow you" at the rally, where the president was accompanied by his wife and a group of ministers.
"Those who tried to destroy Sudan... put conditions on us to solve our problems, I tell them that our dignity is more than the price of dollars," Bashir said in an apparent dig at the United States, which had imposed a trade embargo on Khartoum in 1997.
The embargo was lifted in October 2017, but Sudanese officials including Bashir have continued to blame Washington for the country's economic woes.
Dressed in a khaki shirt and trousers and waving his trademark cane, a smiling Bashir greeted the crowd as men and women whistled and waved flags.
"We are with our leader because our brothers want to destroy our country, but we will save it," a female supporter told AFP.
More than 800 protesters, opposition leaders, activists and journalists have been arrested since the unrest began, officials say.
"Right now, some of the opposition groups and trade unions are trying to mobilise more protests, and probably they are thinking of how to escalate," said Matt Ward, senior Africa analyst at Oxford Analytica.
"But so far there hasn't been an escalation, they are persistent but they haven't risen in intensity in a significant way."
Britain, Norway, Canada and the US have called for an investigation into the deaths, warning earlier this week in a joint statement that Khartoum's actions would "have an impact" on its relations with their governments.
Sudan said the concern expressed by the four countries was "biased... and far from reality".
"Sudan is committed to freedom of expression and peaceful demonstrations," the foreign ministry said on Wednesday.