People wait to be registered as displaced persons in a South Sudan Red Cross compound in Wau on July 1. Renewed clashes saw United Nations compounds under fire on July 10. (Charles Lomodong/AFP/Getty Images)

South Sudanese forces struck two United Nations compounds as clashes between two factions continued for a third day, shattering a fragile peace agreement that was meant to end a bloody, 31-month civil war.

The United Nations mission here said in a statement that the two bases in Juba, the capital, “have sustained impacts from small arms and heavy weapons fire.”

That fighting on Sunday prompted about 1,000 internally displaced people to flee a designated protection site for civilians and rush to a compound where U.N. staff live and work, the statement said.

The violence between forces led by the country's president, Salva Kiir, and its vice president, Riek Machar, has spread across Juba since Friday, when members of the two groups clashed in front of the presidential palace. Radio Tamazuj, a local news outlet, reported on Sunday that as many as 271 people may have died so far. Col. William Gatjiath, Machar's military spokesman, told the BBC that “hundreds” of Machar's troops had died on Sunday. Many civilians are also expected to be among the dead.

South Sudan declared its independence from Sudan on July 9, 2011. But in December 2013, fighting in Juba between Machar and Kiir’s forces triggered a civil war that consumed the country. Much of the conflict fell along ethnic lines, with Kiir’s Dinka followers against Machar’s Nuer group.

Many feared on Sunday that violence might once again spread outside Juba, causing mass casualties and once again plunging the country into the throes of civil war.

About 160,000 South Sudanese live in displacement camps managed by the United Nations. But, as Sunday's fighting proved, those sites are not insulated from the country's violence. In February, dozens were killed at a displacement site in Malakal when military forces and other armed men fought for days, as U.N. forces struggled to get the situation under control.