SOUTH SUDAN’S president, Salva Kiir, was meeting with the vice-president, Riek Machar—a former rebel leader and his longtime rival—when fighting broke out on the night of July 8th. Neither man seemed to know what was going on when they addressed a planned press conference. “What is happening outside is something that we cannot explain to you,” Mr Kiir said. An al-Jazeera journalist later saw soldiers’ bodies scattered across the lawn of the presidential compound.

The next day, the fifth anniversary of South Sudan’s independence from Sudan, was eerily calm (the celebrations had earlier been cancelled because of a lack of money). Fighting over the following three days left hundreds of people dead, including two Chinese peacekeepers. At least 36,000 civilians fled to churches, UN bases (one of which was shelled by government forces) and a compound run by the World Food Programme. A ceasefire called by Mr Kiir on the evening of July 11th and hastily echoed by Mr Machar, who had returned to Juba, the capital, with around 1,500 rebel troops in April, seems to be holding. But no one is sure how long it will last, or indeed who started the latest round of violence.

A clash between government soldiers and Mr Kiir’s forces at a checkpoint on July 7th, in which five government soldiers were killed, may have been the immediate trigger. But the problem was vastly worsened because neither Mr Kiir nor Mr Machar, who fought a nasty civil war between December 2013 and August 2015, appear to be in control of their respective firepower. “This was only a matter of time,” says Casie Copland, an analyst at the International Crisis Group, a non-profit organisation, who is based in the city.

For some months now, the peace agreement signed last year has meant very little in some areas of South Sudan. As many as 120,000 people were displaced when government soldiers, who are predominantly from the Dinka group, attacked ethnic Fartit neighbourhoods in the north-western city of Wau on June 24th. And at least 18 were killed in February when South Sudanese troops invaded a UN camp housing around 48,000 civilians in Malakal, in the country’s oil-rich north-east. As fighting raged in Juba there were reports of skirmishes across the country, although it is unclear how serious they were, or if they still continue.

Even if the precarious ceasefire in the capital holds a sustainable, countrywide peace will be hard to secure. The UN’s mission in South Sudan has been criticised for not fulfilling its mandate to protect civilians, both in Malakal and Juba. “Its leadership is not up to the task, and while many of the troops have performed admirably, others have not,” says Ms Copeland. The contingent of more than 12,000 peacekeepers may have to be increased.

The UN’s secretary-general, Ban Ki Moon, has called for an arms embargo and targeted sanctions. “They’re not really a magic solution, but at least they can show the warring parties that it’s not just empty threats by the international community, and gain some leverage,” says a South Sudanese human-rights lawyer. But the number of weapons sloshing around the country, and the 300% inflation currently ravaging an already ruined economy, suggest that the problems faced by the world’s newest country will not ease anytime soon.