South Sudan government forces and rebels have accused each other of breaking a ceasefire agreement just hours after it came into effect.

James Gatdet Dak, the spokesman for the rebel leader Riek Machar, told Al Jazeera from Kenya's Nairobi on Sunday that the army was attacking rebel bases along the Nile river.

"We think that they are not committed to the peace agreement and this is why they are still on the offensive against our forces," he said.

"It is a violation of the ceasefire which he [President Salva Kiir] has declared himself."

Ateny Wek Ateny, the spokesman for Kiir, told Al Jazeera from South Sudan's capital, Juba, that the government was committed to the truce deal.

He rejected the rebel accusations and said that it was the army that was attacked.

"The government forces are instructed to remain in their baracks by their commander-in-chief," he said.

"It is the responsibility of those who have actually mediated peace to have a mechanism that can determine who is actually attacking here now."

Al Jazeera's Anna Cavell, reporting from Juba, said there had been fighting in Upper Nile, Jonglei and Unity State since the peace deal came into effect at midnight local time on Saturday.

Seven ceasefires

Kiir signed the peace accord on Wednesday, more than a week after Machar, which aims to end the brutal civil war in the country.

It was brokered by the regional eight-nation IGAD block, along with the UN, African Union, China, Britain, Norway and the US.

At least seven ceasefires have already been agreed and then shattered within days or even hours in the world's youngest nation.

More than two million people have fled their homes in a 20-month conflict marked by ethnic killings, gang rapes and the use of child soldiers. About 200,000 civilians are sheltering inside UN bases.

The civil war began in December 2013 when Kiir accused Machar, his former deputy, of planning a coup, setting off a cycle of retaliatory killings that has split the impoverished country along ethnic lines.