JUBA Tens of thousands of South Sudanese danced and cheered as their new nation declared independence on Saturday, a hard-won separation from the north that still leaves simmering issues of disputed borders and oil payments unresolved.
The president of South Sudan, Salva Kiir, stood next to his old civil war foe the president of Sudan, Omar Hassan al-Bashir, who now leads just the north, at a ceremony to mark the birth of the new nation.
Under-developed, oil-producing South Sudan won its independence in a January referendum -- the climax of a 2005 peace deal that ended decades of fighting with the north.
Security forces at first tried to control the streets in the south's dusty capital Juba, but retreated as jubilant crowds moved in overnight and through the day, waving flags, dancing and chanting "South Sudan o-yei, freedom o-yei."
Some revelers fainted in the blistering heat as South Sudan's parliamentary speaker, James Wani Igga, read out the formal declaration of independence.
"We, the democratically elected representatives of the people ... hereby declare Southern Sudan to be an independent and sovereign state," said Igga before Sudan's flag was lowered, the South Sudan flag was raised and the new anthem sung. Kiir took the oath of office.
People threw their hands in the air, embraced and wept. "We got it. We got it," one man said as he hugged a woman.
The presence of Bashir, who campaigned to keep Africa's largest state united, was a key gesture of goodwill.
It will also be an embarrassment to some Western diplomats at the event. The International Criminal Court has issued an arrest warrant for Bashir on charges of war crimes in Darfur.
Bashir gave a speech congratulating the new country. "The will of the people of the south has to be respected," he said, adding that both states had to maintain peace.
North Sudan's government was the first to recognize South Sudan on Friday, hours before the split took place, a move that smoothed the way to the division.
The United States, China and Britain signaled their recognition of the state on Saturday, according to official statements and government media reports.
"After so much struggle by the people of South Sudan, the United States of America welcomes the birth of a new nation," said U.S. President Barack Obama, stopping short of announcing any immediate changes in longstanding U.S. sanctions on Sudan that Khartoum has been hoping will be lifted.
Dignitaries including U.N. Secretary General Ban Ki-moon and the leaders of about 30 African nations attended.
In a possible sign of the South's new allegiances, the crowd included about 200 supporters of Darfur rebel leader Abdel Wahed al-Nur, fighting Khartoum in an eight-year insurgency just over South Sudan's border in the north.
Earlier, the supporters of Nur's rebel Sudan Liberation Army faction stood in a line chanting "Welcome, welcome new state," wearing T-shirts bearing their leader's image. One carried a banner reading "El Bashir is wanted dead or alive."
Traditional dance groups drummed and waved shields and staffs in a carnival atmosphere.
"Free at last," said Simon Agany, 34, as he walked around shaking hands after midnight -- the time when officials said the South actually became the world's newest nation.
The crowd cheered as Kiir unveiled a giant statue of civil war hero John Garang, who signed the peace deal with the north.
Kiir offered an amnesty to rebels fighting his government and promised to bring peace to troubled border areas.
"I would like to take this opportunity to declare amnesty for all those who have taken up arms against Sudan," he said.
"I want to assure the people of Abyei, Darfur, Blue Nile and South Kordofan that we have not forgotten you. When you cry, we cry. When you bleed, we bleed. I pledge to you today that we will find a just peace for all," he said.
SEEDS OF FUTURE TENSION
Khartoum's recognition of the South did not dispel fears of future tensions.
Northern and southern leaders have still not agreed on a list of issues, most importantly the line of the border, the ownership of the disputed Abyei region and how they will handle oil revenues, the lifeblood of both economies.
At the stroke of midnight the Republic of Sudan lost almost a third of its territory and about three quarters of its oil reserves, which are sited in the south. It faced the future with insurgencies in its Darfur and Southern Kordofan regions.
In Khartoum on Saturday, one sign of the new national order was the disappearance of some English-language and SPLM-linked newspapers. The north said it suspended them on Friday as they were published or owned by southerners -- an ominous signal for more than 1 million southerners left in the north.
Many northerners see the separation as a loss of face.
Analysts have long feared a return to war if north-south disputes are not resolved.
Mostly Muslim Sudan fought rebels in the south, where most follow Christianity and traditional beliefs, for all but a few years from the 1950s in civil wars fueled by ethnicity, religion, oil and ideology.
(Additional reporting by Ulf Laessing, Andrew Heavens and Khaled Abdelaziz in Khartoum and Megan Davies at the United Nations; Writing by Andrew Heavens; Editing by Tim Pearce)