"70 percent of the children are out of school, that is highest in the world. There is too much violence."

(Updates with official warning charities)

JUBA, Jan 19 (Reuters) - Seventy percent of South Sudan's children are out of school and the young country risks losing a generation that would make it harder to rebuild after conflict ends, a United Nations official said.

South Sudan, which split off from its northern neighbour Sudan in 2011, has been gripped by a four-year civil war sparked by political rivalry between incumbent leader Salva Kiir and his former deputy Riek Machar.

In an interview with Reuters on Friday, Henrietta H. Fore, UNICEF's executive director, made the warning after visiting some of the areas most devastated by the war.

"70 percent of the children are out of school, that is highest in the world. There is too much violence," she said.

"If we don't help... we are going to lose this generation and that would be tragic for South Sudan because a country cannot build itself without this next generation of young people."

Fore said she had visited towns in the country's north and witnessed widespread malnutrition among children and warned: "We are heading into the dry season... we might lose up to a quarter of a million children in South Sudan."

Tens of thousands are estimated to have died in the conflict which has also displaced a quarter of the country's population of 12 million.

The economy, almost entirely dependant on oil exports, has been left in tatters as output has been cut.

Agricultural production, too, has declined as insecurity has left sometimes entire villages abandoned and crops untended.

A ceasefire deal was signed in Ethiopia's capital Addis Ababa last month but it has been violated repeatedly with both sides blaming each other.

Attacks have also been directed at humanitarian workers, complicating delivery of relief services on which hundreds of thousands of the displaced depend.

Some 28 aid workers were killed in South Sudan last year, with nine shot dead in November alone, according to the United Nations.