South Sudan's President Salva Kiir
South Sudan's President Salva Kiir (Reuters)

Heavy fighting has erupted between rival factions of the presidential guards units in the South Sudanese capital of Juba in an attempted coup to remove president Salva Kiir.

Gunfire and explosions were reported between soldiers loyal to former deputy President Riek Machar, who was sacked by Kiir in July, and presidential troops.

The president declared a dawn to dusk curfew in the capital after the attempted coup and accused Machar of inciting it.

"The government is in full control [...] after a failed coup attempt," said Kiir.

South Sudan's foreign ministry said that "disgruntled soldiers, politicians attempted to overthrow government".

Clashes were concentrated in two military barracks, the main Bilpam barracks north of the airport and at Jebel barracks south of Juba, where the presidential guard is based.

Witnesses said there were bodies on the streets in some areas. Juba international airport was shut down, according to reports.

Army spokesman Col Phillip Aguer said some army bases had come under attack, but that the military was in full control, according to AP.

South Sudan split from Sudan in 2011, after decades of conflict, but armed groups remain active in the country.

Clashes began when one unit of the president's guards - who are formed mainly by the Nuer ethnic group - became suspicious of deployements of a group of mainly Dinka groups.

President Kiir is from the Dinka community, which is the largest in South Sudan. Machar, the deputy who was sacked in July along with the entire cabinet, is from the Nuer group.

Many Nuer have complained about Dinka political domination in the country and Machar had said he wanted to challenge the current president in 2015 presidential elections.

The UN envoy for South Sudan said she was "deeply concerned" over the fighting.

"As the Special Representative of the Secretary General I urge all parties in the fighting to cease hostilities immediately and exercise restraint. I have been in touch regularly with the key leaders, including at the highest levels to call for calm," said Special Representative of the Secretary-General Hilde Johnson.