The president of South Sudan and his opposition rival both called Monday for a ceasefire in a conflict that has seen fierce clashes between their forces spread from the capital to a southeastern town.

President Salva Kiir declared a halt in fighting that began Thursday night and has raised fears of a return to civil war that could draw in even more of the East African country's ethnic groups. On Saturday, the troubled nation marked the fifth anniversary of its independence from Sudan.

Hours after the declaration by Kiir, gunfire could still be heard, although it was unclear if was fighting or troops firing in celebration.

Former rebel leader Riek Machar also called for a ceasefire. Machar, who is the country's first vice-president under a fragile peace deal, made the call in an interview with South Sudan-based Eye Radio. He also said he was still in Juba but would not elaborate.

Kiir's announcement came after his forces overran an opposition base in Juba and killed 35 of Machar's bodyguards, according to opposition officials. The government forces also attacked a UN peacekeeping base and camp for civilians who fled the violence.

Arms embargo

UN secretary general Ban Ki-moon urged the Security Council to place an immediate arms embargo on South Sudan. Speaking to reporters Monday, Ban also called for additional sanctions against South Sudan leaders who have blocked the existing peace deal and the "fortifying" of the UN peacekeeping force there.

"The renewed fighting is outrageous," Ban said. "It is yet another grievous setback. It deepens the country's suffering. It makes a mockery of commitments to peace."

Many of the thousands displaced by the fighting are seeking shelter at two UN bases, a World Food Program compound and other areas, said Matilda Moyo, a spokeswoman at the UN Office for the Co-ordination of Humanitarian Affairs.

The UN has ordered an embargo on arms trade to South Sudan as both sides of the civil conflict call for a ceasefire. (Sinisa Marolt/WFP/Associated Press)

Massive explosions were heard in Juba's Tomping neighbourhood, which houses a UN compound where at least 3,000 civilians have sought shelter. The district also has several embassies and the airport.

"It rings through the whole city every time they fire," said an aid worker, who spoke on condition of anonymity because he was not authorized to talk to reporters.

The United States told its citizens it would evacuate all non-essential staff from the country. The Canadian Embassy has closed, according to a message sent to its citizens. India is planning to evacuate its citizens from the country, according to a tweet by its external affairs minister.

Clashes in southeast

In addition to the continued battles in Juba, clashes broke out in the town of Torit in the southeast. There also have been sporadic hostilities in Wau in the west.

South Sudan's civil war broke out in December 2013 after fighting between the Dinka and Nuer ethnic groups spread across the country. The two-year civil war killed tens of thousands and displaced more than two million.

The war exposed South Sudan's other ethnic divisions: Kiir's supporters are largely Dinka, while Machar's followers are mostly Nuer.

First Vice-President of South Sudan and former rebel leader, Riek Machar (left), and President Salva Kiir sit for an official photo on April 29. The two have called for a ceasefire amid fighting between rival factions. (Albert Gonzalez/AFP/Getty Images)

Kiir and Machar signed a peace accord last year and formed an uneasy transitional coalition government. But fighting continued despite the agreement, and the current clashes in Juba threaten to plunge the parts of South Sudan that had been relatively stable back into violence.

The new fighting also has raised concern the conflict could spread to other ethnic groups.

Luuk van de Vondervoort, former member of the UN panel of experts on South Sudan, said that "2013 was mostly a fight between the Dinka and Nuer at the local level, but now it's everyone against everyone, and we have no idea where this is going to head."

"Getting the pieces back together is going to be incredibly, incredibly difficult. You can't the put the genie back in the bottle now," he said.

In addition to killing Machar's bodyguards, government forces bombed his house, said rebel spokesman Goi Jooyul Yol at a news conference in Addis Ababa, Ethiopia.

Displaced civilians flee

Much of the fighting in Juba centred in the Jebel area where there is an opposition camp and another UN base where about 28,000 displaced civilians have been living since 2013. Thousands more fled to the camp in the current fighting.

Government troops overran the opposition base in Jebel, leaving the forces loyal to Machar with only their camp in the Gudele area as a foothold in Juba, said William Gatjiath Deng, an opposition spokesman.

Two government helicopters bombed areas near the UN base, while ground forces shelled the camp that houses tens of thousands of civilians, according to a source in the UN compound who spoke on condition of anonymity because he was not authorized to talk to reporters.

The displaced civilians are mostly of the Nuer ethnic group who sought protection from the UN after a series of government-led killings of Nuer in Juba in 2013 that sparked the civil war, according to an African Union commission of inquiry.

UN's role

Government officials have repeatedly accused the civilians inside the UN bases of being rebels or rebel supporters.

UN peacekeepers have not protected civilians at the Jebel camp or fired at the troops shelling the base, said the source in the base, who accused the soldiers with UN blue helmets of abandoning their positions.

"UN peacekeepers, they even run away," he said. "They are not stopping it."

UN peacekeepers in South Sudan are mandated to use lethal force to protect civilians under imminent threat in South Sudan.

A government tank fired on a Chinese armoured personnel carrier Sunday, a witness in the UN base told The Associated Press. The witness spoke on condition of anonymity because he was not authorized to talk to the press. Two UN peacekeepers from China were killed at the base, according to Chinese state media. Video from Chinese state TV showed smoke rising after the attack and Chinese peacekeepers tending to their wounded.

There were 67 injuries and eight deaths in the UN base Sunday, according to an internal situation report circulated among humanitarian organizations and seen by AP. Tanker trucks have been unable to bring water to the tens of thousands of people in the base.

A hospital operated by the International Medical Corps was hit by shelling, but no one was injured and the patients had to be relocated, the organization said. Since Friday, it has treated 139 wounded, the group added.