South Sudan President Salva Kiir
South Sudan's President Salva Kiir delivers a speech in the capital Juba, June 10, 2013. Reuters/Andreea Campeanu

A ceasefire to end the five-month conflict that has displaced 1.5 million people in South Sudan has come into effect, the BBC reported Saturday.

President Salva Kiir and rebel leader Riek Machar signed the deal on Friday. Government troops will defend themselves if attacked, but no problems are expected, said Kiir's spokesman.

A previous deal, made in January, collapsed within days, with each side accusing the other of violations.

The agreement was signed in the Ethiopian capital, Addis Ababa, after the rivals' first face-to-face meeting since hostilities began in December.

The deal came a week after U.S. Secretary of State John Kerry met with Kiir and pushed for direct talks.

"I saw with my own eyes last week the stakes and the struggles in a new nation we helped courageous people create," Kerry said Friday after the deal, according to CNN.

"The people of South Sudan have suffered too much for far too long. In this most recent crisis alone, over one million people have been displaced, even more now face the prospect of famine ... there have been human rights abuses on a massive scale committed by both sides."

Earlier, the U.N. called on both sides to facilitate deliveries of emergency aid to a population in danger of mass hunger: The U.N. estimates that 5 million people are in need.

Besides an immediate ceasefire, the deal envisages the creation of a transitional government before the drafting of a new constitution and fresh elections.

But it is not clear how that government would be formed and, with many details of the deal yet to be worked out, officials caution that a lasting peace may still be some way off.

Kiir's spokesman, Ateny Wek Ateny, told the BBC it was up to Machar to rebuild the trust lost during the fighting that has cost thousands of lives.

"We hope that things will go well because the highest levels have signed the document and the other side, the rebels, they should also respect the words and signatures of their leaders," said the spokesman.