JUBA (Reuters) - Fighting erupted between South Sudanese soldiers overnight around the capital and gunfire and explosions could still be heard on Monday morning, witnesses in Juba said, following months of tension after the president sacked his deputy.

Jok Madut Jok, Chairman of South Sudan’s Sudd Institute think tank in Juba, told Reuters it was believed that soldiers loyal to former Vice President Riek Machar, who was sacked by President Salva Kiir in July, had initiated the fighting.

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

“It’s been going on all night and it resumed very heavily this morning,” Jok said by telephone from Juba. “It’s coming from groups said to be loyal to former VP Machar.”

Another South Sudanese commentator described the fighting as a “mutiny” but details were sketchy.

The U.N. envoy for South Sudan called for an end to the fighting in Africa’s newest nation that won independence in 2011.

“I urge all parties in the fighting to cease hostilities immediately and exercise restraint,” U.N. Special Representative of the Secretary-General Hilde Johnson said in a statement.

“I have been in touch regularly with the key leaders ... to call for calm.”

One soldier at Bilpam, contacted by Reuters in the early morning, said they were under attack. Gunfire could be heard in the background as he spoke.

Presidential spokesman Ateny Wek Ateny told Reuters fighting began among the presidential guard at the Jebel barracks.

“Everyone is in lockdown at the moment,” said Jok. He said the Johnson was shuttling between the Machar and Kiir camps to try to secure an end to the fighting.

It was believed that many of the soldiers loyal to Machar were from his Nuer tribe, who have fought before against the dominant Dinka tribe in South Sudan to which Kiir belongs.

The Twitter account of the U.S. embassy in South Sudan denied rumors the former vice president had taken refuge at the base and said the mission was monitoring the security situation.

“Gunshots/artillery fired over the past few hours in several locations in #Juba. We urge everyone to take caution at this time. #SouthSudan,” said a tweet from @USMissionJuba.

Foreign Minister Barnaba Marial Benjamin had no immediate comment when he was contacted on Monday morning but said he could have a statement shortly.