JUBA, SOUTH SUDAN—South Sudan’s leaders have formed a transitional coalition government bringing together politicians from the government and the armed opposition who have been at war for two and a half years.

The new government is led by President Salva Kiir and former rebel leader Riek Machar, who returned to the capital Juba on Tuesday to take up the post of first vice-president.

Kiir named 16 of the new government’s 30 cabinet ministers while Machar nominated 10. Four others were selected by political groups outside Kiir and Machar’s factions.

The government, which has a 30-month mandate culminating in fresh elections, has been formed according to a peace deal signed by Kiir and Machar last August under intense pressure from the international community.

At the cabinet’s first meeting Friday, Kiir appealed to foreign nations to give money to the new government. South Sudan’s government faces a severe budget shortfall as a result of the war and falling oil prices.

“The people who were saying that you cannot be supported (with foreign aid) unless you form the transitional government of national unity, if they have agents here, they should report back to them that the government has been established,” Kiir said.

Machar said the new government must deal with violence which continues despite the peace deal.

“If our people feel in Juba that they can’t walk by night, even if we preach peace to them, they say, ‘we don’t see it,’ ” he said.

The peace deal also calls for unrestricted delivery of humanitarian relief and the release of political prisoners.

Prominent detainee Joseph Bakosoro, a former governor seen as critical of Kiir’s government, was freed on Wednesday after over four months’ imprisonment.

Tens of thousands were killed in South Sudan’s civil war since 2013 after a falling out between Kiir and Machar.