* Crowd raids U.N. base where locals were sheltering
* Kiir says ready to talk, rival says wants him to quit
* Fighting has reached vital oil fields
By Carl Odera
JUBA, Dec 20 (Reuters) - South Sudan's government said on Friday it was ready for dialogue with rivals to prevent a return to war as African ministers sought to broker peace in the two-year-old nation, where hundreds have been killed in fighting this week.
The United Nations said on Thursday a crowd of Nuer tribesmen breached a U.N. compound in Jonglei State north of the capital and it had reports some people were killed.
President Salva Kiir, a member of the Dinka ethnic group, has accused his former Vice President Riek Machar, a Nuer who was sacked in July, of attempting to seize power by force.
Fighting that began on Sunday in the capital has swiftly spread, fuelled by ethnic divisions.
Kiir has said he is ready for dialogue. Machar told French radio that he was ready to "negotiate his departure from power" and said the army could force Kiir out if he did not quit.
"President Kiir has always said that he doesn't want his people to turn back again to war," Foreign Minister Barnaba Marial Benjamin told Reuters. "That is why the government has been negotiating with a lot of militia groups."
Kiir was due to hold talks on Friday with ministers from Ethiopia, Kenya, Uganda, Djibouti and Somali, along with representatives from the African Union and United Nations.
Fighting that has spread to vital oil fields worries neighbouring states, who fear new instability in a volatile region of the continent. It threatens what were already only halting steps towards creating a functioning state that declared independence from Sudan in 2011 after decades of conflict.
Officials have said till now that oil production, which had stood at about 245,000 barrels per day and provides most of South Sudan's revenues, have not been affected.
A source in Sudan, which hosts the sole export pipeline, said on Thursday there had been no disruption.
But 200 oil workers sought refuge in a U.N. base on Thursday. China National Petroleum Corp, one of the main operators, said it was flying 32 workers out of one field to Juba, according the Chinese state news agency Xinhua.
The foreign minister and other officials have sought to play down the ethnic rifts, blaming the fighting on political differences. But since fighting moved beyond the capital, clashes have been increasingly driven by ethnic loyalties.
"So we have a military coup in our hands which is causing a lot of instability in the country and is being played up in certain areas as if it is a racial ethnic war, which is not the case," Benjamin said.
"We don't want to encourage what happened in Rwanda," he said, a reference to the 1994 genocide in Rwanda.
The United Nations said on Tuesday it understood up to 500 people had been killed in clashes but has not given a death toll since then. It says about 34,000 people have fled to bases of the UNMISS peacekeeping mission since fighting started.
Clashes in Bor town, where Nuer in 1991 massacred Dinka, have fuelled the fears of an ethnic war. A Nuer commander and Machar ally, Peter Gadet, now controls Bor, officials said.
A U.N. official said Luo Nuer youths, from a sub-group of Machar's Nuer ethnic group, had assaulted the Akobo base in Jonglei, saying there were believed to be some deaths.
Presidential spokesman Ateny Wek Ateny told Reuters that 54 people from Kiir's Dinka ethnic group were killed by what he called Machar loyalists in the Akobo raid.
Political tensions between the two politicians had been mounting since Kiir, facing mounting public frustration about the slow pace of development, sacked Machar.
The former vice president said he wanted to run for office and accused Kiir of acting like a dictator.
Speaking to France's RFI radio, Machar said that if Kiir did quit office: "I think the people will depose him, in particular, influential people in the army."
Before the fighting erupted, Kiir accused his rivals of reviving the kind of splits in the ranks of ruling SPLM party that led to led to bloodshed in 1991. But analysts said he had raised the stakes by branding initial clashes a coup attempt. (Additional reporting by Drazen Jorgic in Nairobi, Aizu Chen in Singapore and Maggie Fick in Cairo, Writing by Edmund Blair, Editing by Angus MacSwan)