The United Nations security council voted to increase the UN peacekeeping force in South Sudan on Tuesday, as the world's newest country slipped closer to civil war.

The resolution, adopted unanimously, boosts the force from 7,000 to 12,500 and also increases the police contingent from 900 to 1,323. It called for "an immediate cessation of hostilities and the immediate opening of a dialogue."

Earlier on Tuesday, the UN's humanitarian arm said it had found three mass grave sites in two different parts of South Sudan, while a senior official said the death toll in the country's emerging civil war had run "into the thousands".

UN human rights investigators, who have faced some criticism in South Sudan at their inactivity since the crisis began on 15 December, said they had identified sites in a rebel-held northern state and in the capital, Juba. Meanwhile forces loyal to the president, Salva Kiir, claimed they had retaken Bor, a strategically important town in the vast Jonglei state that was among the first to fall under rebel control last week.

With no sign of the conflict abating, the UN security council authorised the temporary transfer of troops, police and equipment from UN missions in Congo, Darfur, Abyei, Ivory Coast and Liberia. The council condemned the fighting and violence against civilians and ethnic communities that have caused hundreds of deaths across South Sudan, and reported human rights violations by all parties.

An estimated 50,000 civilians are now hiding in five UN bases across the two-and-a-half-year-old nation. Some 24,000 civilians have gathered in the bush in Lakes States, aid workers said. Tens of thousands more have sought sanctuary in churches, including 5,000 in a single Catholic Church in the capital.

The violence began after a fight between Dinka and Nuer soldiers in the presidential guard on 15 December, igniting a simmering political power struggle in South Sudan's ruling party and sparking widespread ethnic killings. UN officials said the death toll has risen above 1,000.

The reports of mass graves strengthen fears that the death toll in the conflict will grow. UN officials said 14 bodies were found in a single grave in Bentiu, capital of Unity State, and 20 more on a riverbank nearby. Earlier in the day the UN in Geneva had said that 75 bodies had been found but this was later revised to 34, with 75 feared missing and presumed dead.

A UN spokeswoman said that the victims appeared to be soldiers from the Sudan Peoples' Liberation army, the national military. They were reportedly ethnic Dinka, the tribe of President Kiir. South Sudan's minister of information, Michael Makuei Lueth, said Bentiu was under the control of rebels loyal to the country's former vice-president, Riek Machar, who is Nuer.

The UN high commissioner for human rights, Navi Pillay, called on both sides to protect civilians and warned that political and military leaders could be held to account for crimes. "Mass extrajudicial killings, the targeting of individuals on the basis of their ethnicity and arbitrary detentions have been documented in recent days," Pillay said in a statement. "We have discovered a mass grave in Bentiu, in Unity State, and there are reportedly at least two other mass graves in Juba."

On Monday, the Guardian uncovered details of a massacre in a police station in Juba where more than 240 people were allegedly killed. Aid workers admit in private that the real toll could stretch to the "tens of thousands" but firm numbers are not available while heavy fighting continues in several areas.

"I have absolutely no doubt in my mind that we're into the thousands," said the UN's chief of humanitarian affairs, Toby Lanzer.

Clashes broke out between rival army factions in the capital of the oil-producing Upper Nile state, Malakal, on Tuesday. It comes on top of fighting in Unity State, now under rebel control and in Bor, the capital of the restive Jonglei state.

South Sudan's president, who continues to insist that he was the victim of an attempted coup over a week ago, said that government forces had retaken Bor. There was no independent confirmation of a change in control of the town.

The United States, Norway and Ethiopia are leading efforts to open peace talks. Officials say Kiir and Machar have agreed to meet but specifics including the status of prisoners are holding up talks.

The new mandate for the UN mission will boost troop numbers and provide additional UN police. It also calls for more active protection of civilians.

The Associated Press at the United Nations contributed to this report