Five people were wounded as heavy gunfire broke out in Sudan's capital Tuesday as several agents of a long-feared security agency launched a "rebellion" against a restructuring plan, medics and security officials said.

A teenager and a soldier were among those wounded when shots were fired at some bases of the Directorate of General Intelligence Service, formerly known as the National Intelligence and Security Service (NISS), the powerful security arm of toppled president Omar al-Bashir.

NISS agents were at the forefront of a crackdown against protesters during a nationwide anti-Bashir uprising that erupted in December 2018 and finally led to his ouster by the army last April.

Witnesses and an AFP correspondent reported that gunfire broke out at the agency's bases in the capital's Riyadh and Khartoum North areas.

The AFP correspondent said several vehicles carrying soldiers and troops from the Rapid Support Forces (RSF) had moved on the bases.

Tanks were later also seen surrounding the NISS base in Riyadh.

"Troops from operating centres of the intelligence started a rebellion in some parts of the capital," government spokesman Faisal Mohamed Saleh told state television.

Members of Sudan's intelligence services shoot bullets in the air at the headquarters of the Directorate of General Intelligence Service in the Riyadh district of the capital Khartoum Members of Sudan's intelligence services shoot bullets in the air at the headquarters of the Directorate of General Intelligence Service in the Riyadh district of the capital Khartoum Photo: AFP / ASHRAF SHAZLY

He said a number of NISS troops had come out on the streets, set up barricades and opened fire in the air.

"This happened because those troops rejected the amount of money they got for their retirement," Saleh said, adding negotiations were being held.

Doctors close to the protest movement that led to Bashir's fall said a 15-year-old boy and a soldier were among five people wounded by gunfire.

Heavy gunfire erupted again at the Khartoum North base late in the evening, and a security source told AFP that the army and RSF had taken control of the two bases.

A top general accused the former head of the intelligence agency of planning the revolt.

The headquarters of Sudan's Directorate of General Intelligence Service in the capital Khartoum where heavy gunfire broke out as several agents of the long-feared security agency launched a "rebellion" against a restructuring plan The headquarters of Sudan's Directorate of General Intelligence Service in the capital Khartoum where heavy gunfire broke out as several agents of the long-feared security agency launched a "rebellion" against a restructuring plan Photo: AFP / ASHRAF SHAZLY

"What happened today is a plan by Salah Ghosh and some other officers," General Mohamed Hamdan Daglo, who heads the RSF, told reporters in the South Sudanese capital of Juba.

Ghosh, a key figure of Bashir's regime, stepped down days after the veteran leader was toppled. His whereabouts are unknown.

Sudan's prosecutor general called for removing the immunity of NISS personnel involved in the revolt.

"Those members of the intelligence involved in what happened today have committed a crime ... I call for their immunity to be removed so they can face justice," the prosecutor general said in a statement.

Sudan's protest movement, the Forces of Freedom and Change -- a key part of the transitional government -- urged residents to remain calm.

"We are calling on our people to be calm and not give a chance for those who want to drag our homeland into bloodshed," it said.

NISS, in a statement, said it was "assessing the situation".

"In the process of restructuring NISS, there are some members who have rejected the financial compensation offered for retirement," it said earlier on Tuesday.

A security source told AFP that the first shooting broke out in the city of Al-Obeid after which gunfire erupted at NISS bases in Khartoum.

Authorities also closed the capital's airport, the civil aviation authority said.

In an effort to reassure the public, Prime Minister Abdalla Hamdok said the situation was under control.

"We want to tell our people that the situation is under control and this will not stop us from achieving the goals of our revolution," he tweeted.

"I (can) assure that (the) Sudanese armed forces and other regular forces have the capacity to handle the situation," he wrote.

Since August, Sudan is ruled by a joint civilian-military body, with the day to day affairs run by Hamdok's government.

The ruling body is tasked with overseeing the country's overall transition to civilian rule as demanded by the protests that ended Bashir's 30-year rule.