JUBA (Reuters) - Thousands of South Sudanese danced in the streets on Saturday to mark their long-awaited independence, a hard-won separation from the north that also plunged the fractured region into a new period of uncertainty.
The new Republic of South Sudan, an under-developed oil producer, became the world's newest nation on the stroke of midnight.
It won its independence in a January referendum -- the climax of a 2005 peace deal that ended decades of civil war with the north.
In the south's capital Juba, people on the corners of dirt streets waved flags and danced in the lights of car headlights, chanting "SPLM o-yei, South Sudan o-yei, freedom o-yei."
The Sudan People's Liberation Movement (SPLM) led the rebels who fought the north until 2005 and now dominates the southern government.
Thousands packed the streets of Juba and crammed into the back of trucks, setting off fireworks, banging on plastic cans and dancing.
"Free at last," said Simon Agany, 34, as he walked around shaking hands. "Coming away from the north is total freedom."
Men and women coming out of a late night church service shook hands and congratulated each other, wishing each other "Happy Birthday, Happy Birthday."
Among the revelers was South Sudan's information minister, Barnaba Marial Benjamin, who told Reuters: "It is already the ninth so we are independent. It is now."
North Sudan's Khartoum government was the first to recognize the new state, hours before the formal split took place, a move that smoothed the way to the division of what was, until Saturday, Africa's largest country.
The recognition did not dispel fears of future tensions.
Northern and southern leaders have still not agreed on a list of sensitive issues, most importantly the exact line of the border and how they will handle oil revenues, the lifeblood of both economies.
At the stroke of midnight the Republic of Sudan lost around three quarters of its oil reserves, which are sited in the south, and faced the future with insurgencies in its Darfur and Southern Kordofan regions.
In Khartoum, just before the split, Sudanese President Omar Hassan al-Bashir, who now leads just the north, told journalists he would attend the independence celebrations later in the day in Juba.
"I would like to stress ... our readiness to work with our southern brothers and help them set up their state so that, God willing, this state will be stable and develop," said Bashir.
Analysts have long feared a return to civil war if disputes are not resolved.
Southern officials said the birth of the new nation would take place at midnight from July 8 to 9, followed by a formal independence ceremony later on Saturday.
According to the official program, a formal Proclamation of the Independence of South Sudan will be read out by southern parliament speaker James Wani Igga at 11:45 a.m. (0845 GMT). Minutes later Sudan's national flag will be lowered and the new flag of South Sudan will be raised.
"At midnight, bells will be rung across the new country, and drums will be sounded, to mark the historic transition from southern Sudan to the Republic of South Sudan," a statement from the southern government said.
U.N. Secretary General Ban Ki-moon told reporters in Juba on Friday he was confident South Sudan would soon join the global body.
"South Sudan begins life as a state facing enormous challenges. But South Sudan has remarkable potential, with natural resources, huge amounts of arable land and the waters of the White Nile flowing through it."
Earlier in Khartoum, Ban urged the northern government to allow U.N. peacekeepers to stay beyond the end of their mandate to monitor the situation in Southern Kordofan, the north's biggest remaining oil producing state, and other hotspots.
The mandate of UNMIS, which has deployed 10,000 peacekeepers in Sudan and was set up to monitor the ceasefire, expires on Saturday.
The U.N. Security Council voted on Friday to establish a new mission in South Sudan called UNMISS, with up to 7,000 U.N. peacekeepers and an additional 900 civilian police.
Additional reporting by Ulf Laessing and Khaled Abdelaziz in Khartoum and Megan Davies at the United Nations; Writing by Andrew Heavens, editing by Tim Pearce