About 20 people have been killed and dozens wounded in attacks on protesters calling for an end to the 30-year rule of Sudan’s president, Omar al-Bashir, the head of the main opposition party has said.

Armed militias loyal to the Sudanese dictator have launched several attacks on demonstrators, most recently before dawn on Tuesday, but army soldiers have repeatedly come out to protect them, often firing shots in the air and deploying on the streets to block approaches to the sit-in outside the defence ministry in Khartoum.

There are conflicting accounts of events during the most recent attack, but witnesses described repeated firing of teargas and live ammunition by the militias between 2am and 5am.

One witness said an officer opened the gates to the naval headquarters, allowing protesters to shelter from an unidentified gunman who was firing on them from a nearby construction site. Images on social media showed hundreds of mainly young people in the HQ at dawn.

There were also reports of dozens of smaller protests around the country on Tuesday, some of which were broken up by security forces.

The “troika” of the US, the UK and Norway issued a joint statement calling on the government of Sudan to stop the violence against peaceful protesters, lift the state of emergency imposed earlier this year and allow a credible, inclusive political dialogue.

“The demand for political change from the courageous and resilient people of Sudan is becoming ever clearer and more powerful. The time has come for the Sudanese authorities to respond to these popular demands in a serious and credible way,” the statement said.

Protests first erupted on 19 December after a government decision to triple the price of bread. The unrest quickly evolved into nationwide demonstrations against Bashir’s rule.

In recent weeks, momentum appeared to have slowed, in part because of fierce repression. However, the biggest demonstrations so far have taken place in recent days, shaking authorities in Khartoum.

The group spearheading the demonstrations has appealed to the army for talks on forming a transitional government. Though some lower-ranking soldiers have shown support, the position of senior officers is less clear.

Play Video 0:43 Sudanese soldiers reportedly protecting anti-government protesters amid violent crackdown – video

Addressing a meeting of military commanders, the defence minister and vice-president, Gen Awad Ibnouf, said security forces would not permit attempts to divide them, according to reports from the state news agency Suna.

However, he did not criticise the protesters and expressed some sympathy with their grievances. “Sudan’s armed forces understand the reasons for the demonstrations and is not against the demands and aspirations of the citizens, but it will not allow the country to fall into chaos,” he said.

Bashir has also acknowledged the protesters have legitimate demands, but said they must be addressed peacefully and through the ballot box. Officials say 38 people have died in protest-related violence so far, while Human Rights Watch put the death toll from December to the end of January at 51. Hundreds have been arrested and jailed after summary trials.

A report released last week by the US-based NGO Physicians for Human Rights said authorities had used “unnecessary and disproportionate force against … citizens, illegally attacked medical responders and facilities, and tortured detainees”.

The sit-in protests recall those during the Arab spring of 2011, when demonstrators in Cairo and other capitals camped out in public squares for days demanding change.

Sudan protests continue as security forces appear split Read more

Observers have pointed to possible inspiration from Algeria, where weeks of peaceful popular protests forced Abdelaziz Bouteflika, in power since 1999, to resign as president this month.

Analysts say it is extremely difficult to predict how the current crisis could end, with the worst-case scenario being violent chaos and continuing conflict such as that seen in Iraq or Libya in recent years. Other possibilities could involve Bashir stepping down or going into exile, allowing a transitional government to take charge.

However, Bashir, who seized power in a military coup, faces genocide charges at the international criminal court relating to extensive human rights abuses perpetrated by Sudanese forces against civilians in Darfur. The western region of the country has been gripped by conflict since 2003, when rebels took up arms against the government, accusing it of discrimination and neglect.

In October 2017, the US eased sanctions against Sudan, citing improved humanitarian access, the mitigation of conflicts within the country and progress on counter-terrorism. The move was condemned by human rights organisations.