Elements of Sudan’s military moved to protect demonstrators during deadly clashes in Khartoum between security forces and protesters, witnesses say.
Soldiers tried to chase away pick-up trucks firing tear gas, on the second night of a sit-in protest calling for President Omar al-Bashir to resign.
Protesters sought shelter in a navy facility, a witness said, as tension among the armed forces was laid bare.
Seven protesters have been killed since Saturday, officials say.
Mr Bashir, who has been in power for nearly 30 years, has so far refused demands to make way for a transitional government.
Security: What happened on Sunday night?
One protester told the BBC’s Newsday programme that a number of pick-up trucks arrived and began firing tear gas and live ammunition at the thousands of sit-in protesters in the Sudanese capital.
She said the military was at first neutral but then tried to chase other security force groups away.
It is unclear who the security forces were but BBC Africa editor Fergal Keane says reports indicate they included agents from the powerful National Intelligence and Security Service (NISS).
The eyewitness said some members of the security forces returned for a second attack and people then ran towards a navy facility to seek shelter from the prolonged firing.
Ali Ibrahim, of the Sudanese Professionals Association (SPA), which has organised the protest, told EFE news agency that military units had fired into the air to prevent some members of the security forces from dispersing the sit-in.
Video on social media showed protesters hiding behind walls as shots ran out.
The sit-in has been taking place outside the army HQ and AFP news agency quotes witnesses as saying the army has now deployed troops around the building and is setting up barricades in nearby streets. The army’s intentions surrounding the protest remain unclear.
Information Minister Hassan Ismail said the protesters in front of the HQ had been “cleared completely”.
Security: Armed divisions?
Analysis by James Copnall, BBC’s former Sudan correspondent
The Sudanese state has numerous armed groups and there are signs of tensions between them.
The demonstrators accuse the NISS and a militia supporting President Bashir of trying to drive them away. The militia is made up of former members of the Janjaweed, the fighters accused of carrying out many atrocities in Darfur.
Over the past 48 hours, several protesters have said members of the Sudanese Armed Forces have protected them. However, many Sudanese still distrust the armed forces, because of their role in keeping President Bashir in power and their conduct in the country’s succession of civil wars.
Some analysts believe that mid-ranking army officers are sympathetic to the protesters, with the top brass more likely to be loyal to the president. But the position of all the armed groups is now one of the key questions in Sudan.
Security: How did this protest begin?
It started on Friday when protesters descended on the zone outside the HQ to call for the removal of Mr Bashir and his government.
It was the biggest protest against the president since unrest began in December and marked the 34th anniversary of the coup that overthrew the regime of former President Jaafar Nimeiri.