NAIROBI (Reuters) - South Sudan’s army clashed with rebels in an oil-producing region early on Sunday, both sides said, shattering a ceasefire hours after it came into effect.

Both sides accused the other of starting the fighting around the town of Koch in Unity state.

Seventeen aid workers fled the violence, according to a humanitarian source. There were no immediate details of casualties.

The government and rebel groups signed a ceasefire on Thursday in the latest attempt to end a four-year civil war and let humanitarian groups reach civilians.

The ceasefire formally came into force on Sunday morning, but fighting broke out soon afterwards, according to a humanitarian security report seen by Reuters.

“Our forces came under heavy fire this morning in Koch county,” Dickson Gatluak, a spokesman for the government side, said. “Our forces acted in self defense and repulsed the attacking forces and defeated them,” he added in a statement.

Rebel spokesman Lam Paul Gabriel said the army attacked first and rebel forces were now pursuing government soldiers towards the town.

The world’s youngest country plunged into war in late 2013 after President Salva Kiir sacked his deputy, Riek Machar.

The dispute erupted into fighting that spread across the country, largely along ethnic lines between forces loyal to Kiir, who is Dinka, and Machar, who is Nuer.

The violence, which the United Nations says has amounted to ethnic cleansing, has forced a third of the population to flee.

Earlier this year, pockets of the country plunged briefly into famine.