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.
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".
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.
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.
The demonstrators appear to be hoping for an internal coup, pleading with the army command to remove Mr Bashir and open the way for a transitional government.
Since the unrest began, Human Rights Watch says protest-related violence has killed 51 people, although officials put the figure at 32, AFP reports.
Why are people protesting?
The protests were originally sparked by a hike in the cost of living but demonstrators are now calling for the president to go.
Sudan's economy has long been strained since the US imposed sanctions more than 20 years ago, accusing Khartoum of sponsoring terror groups.
In December, the government announced the price of fuel and bread would rise. In the year leading up to this, inflation had risen while the Sudanese pound fell rapidly in value.
Mr Bashir's rule has been blighted by accusations of human rights abuses. In 2009 and 2010, the International Criminal Court (ICC) charged him with counts of genocide, war crimes and crimes against humanity. A warrant for his arrest has been issued.
In February, it looked as though he might give in to protests and step down, but instead Mr Bashir declared a state of national emergency. He says the protesters have legitimate grievances but should only replace him through elections.
Who are the demonstrators?
The SPA - a collaboration of health workers and lawyers - has been organising the protests.
Doctors have emerged as a leading force and as a result are being targeted by the authorities.
It is estimated that up two thirds of the protesters are women, who say they are demonstrating against Sudan's sexist and patriarchal society.
Have you recently taken part in the demonstrations? Get in touch by emailing firstname.lastname@example.org
Please include a contact number if you are willing to speak to a BBC journalist. You can also contact us in the following ways: