JUBA, South Sudan — At the stroke of midnight, South Sudan became the world's newest nation and the celebrations began.

For days people in the new capital city have been preparing for the country's independence from Sudan.

Teams of women are swept sidewalks and scrubbed roads in the blistering heat, armed police and soldiers manned junctions and main roads, the airport was shut to all but arriving heads of state and other dignitaries as the countdown clock in the middle of a city roundabout edged to zero.

People here are eager to show-off their new country to the world and, as banners across the city proclaim, to celebrate their “Freedom at Last.”

Dance troupes have been practicing their choreographed moves for days, radio stations repeat the new national anthem and practice marches have given soldiers and veterans the chance to perfect their parades.

Today is full of pomp and ceremony with 30 African heads of state expected to attend — including Sudan's President Omar al-Bashir and Zimbabwe’s Robert Mugabe — as well as a U.S. delegation headed by Washington's ambassador to the United Nations Susan Rice.

Government ministries have been established as have regional governments in the 10 states of the South, a transitional constitution has been passed and will be signed by the new President Salva Kiir. The outline of a functioning state can be discerned.

But the face that Juba shows to the world today is not one that many of the country’s estimated 9 million people would recognize. The Republic of South Sudan is perhaps the world’s least developed nation.

“South Sudan is the most underdeveloped place on the face of the planet because of decades of marginalization,” said Lise Grand, the U.N. humanitarian coordinator for the South. “The worst social indicators in the world are here.”

Infrastructure, health care, education, access to food and water are all rudimentary. Where development has progressed, sometimes fitfully, elsewhere in Africa since the end of colonialism, in southern Sudan war has defined the last half-century.

The last 22-year-long round of civil war killed upwards of 2 million people before a U.S.-backed peace deal was signed in 2005. There has been progress over the last six years but it has been slowed by incompetence, a lack of capacity, corruption and, most importantly, the constant threat of renewed war with Khartoum.

As a result South Sudan has everything to do.

“The political, security and development challenges here would tax even the most developed country so for South Sudan to face all of that and all at once is very difficult,” said one senior Western diplomat who did not want to be named.

In South Sudan’s favor is not just the last six years of largely running its own affairs but also a wealth of natural resources including oil, minerals, timber and agriculture.

“The state is being born with tremendous physical endowments. It has the resources, what it needs is good governance,” said John Prendergast, a seasoned Sudan observer and head of the Enough Project advocacy group.

The new government has few good role models in the region. In Khartoum to the north, Bashir has been indicted by the International Criminal Court (ICC), as have senior government ministers in Kenya to the south. A host of regional leaders including Uganda’s Yoweri Museveni, Ethiopia’s Meles Zenawi, Eritrea’s Isaias Afwerke and Rwanda’s Paul Kagame are proof that rebel leaders tend to make poor democrats.

Like these others the Sudan People’s Liberation Movement (SPLM) has shown a willingness to co-opt opponents into the organization but little tolerance for dissenting views. However Sudan’s Episcopal archbishop and influential religious leader Daniel Deng said the former rebels should not be judged too harshly.

“These people have been freedom fighters for a long time, they know only fighting, to resolve things with bullets, so when overnight they become a government, you don’t expect them to perform a miracle,” he said.

“It will take time and for the last six years they have managed to rule and should be congratulated for that.”

The new state’s greatest existential threat remains its northern neighbor — the Sudan run by President Omar al-Bashir in Khartoum is a hostile and aggressive long-standing enemy. Discussions will drag on beyond independence over how the two countries will share oil revenues, international debt and where the border between them lies. The differences between the two countries could well turn violent.

In May Bashir ended a negotiating table stalemate over whether the disputed border region of Abyei would go to the north or the south by invading the territory. Since early June he has also ordered attacks on the Nuba people of South Kordofan, northerners who fought alongside the southern rebels during the civil war.

“As long as the Nuba Mountains are being bombed and the people of Abyei are displaced the celebratory mood is dampened,” conceded Prendergast.

Archbishop Deng agreed that Saturday’s joy will be tinged with regret for what is happening in South Kordofan. “What our brothers are going through [in the Nuba Mountains] is an ethnic cleansing and if the world does not come in quickly it will result in genocide,” he warned.

Khartoum is also widely suspected of backing militias in the South. Evidence is hard to find but as a Western diplomat put it: “Some of these guys have come in from the North, they must be getting arms from somewhere and it’s not from the South.”

The doomsday scenario, as Prendergast described it, is “a possible next round of substantial proxy war” with the South backing rebels in Darfur, the Nuba Mountains and Blue Nile state and the North supporting anti-SPLM militias headed by former generals like Peter Gadet and George Athor in the South.

But this need not happen. In Kiir the South has a leader who is skilled, not just at warfare but at negotiation, in its population South Sudan has a people desperate for peace and eager to enjoy their freedom, and in its resources the new country has the potential to kickstart the much-needed growth and development.

“Independence is freedom,” said Stephen Olympia, a young primary school teacher directing the dance moves of hundreds of children next to a basketball court in Juba. “It is important because it gives us the right to speak, the right to dance, the right to pray and the right to our own resources.”