South Sudan's flag raised at independence ceremony
Tens of thousands of South Sudanese have watched the raising of the new country's flag at an independence ceremony in the capital, Juba.
Salva Kiir signed the constitution and took his oath of office in front of the jubilant crowds, becoming president of the world's newest nation.
Sudan's President Omar al-Bashir and UN chief Ban Ki-moon were among dignitaries watching the events.
Sudan earlier became the first state to officially recognise its new neighbour.
The world's newest nation was born at midnight local South Sudanese time (2100 GMT), the climax of a process made possible by the 2005 peace deal that ended a long civil war.
The south's independence follows decades of conflict with the north in which some 1.5 million people died.
Saturday's independence ceremony was held at the mausoleum of the late rebel leader John Garang, who died just months after signing the peace deal that ended Africa's longest-running conflict.
The BBC's Will Ross in Juba says people flocked to the event on a baking hot day - some of them climbing trees to get a view.
The Speaker of the South Sudan Legislative Assembly, James Wani Igga, read out the Proclamation of the Independence.
Crowds then cheered as Sudan's national flag was lowered and the new flag of South Sudan was raised as trumpets played the new national anthem.
Afterwards the master of ceremonies told the crowd that President Kiir has decided not to hand over the flag of the Republic of Sudan.
"It shall be kept in the archives of South Sudan in recognition of the common history that we have lived together," he told the crowd.
Our correspondent says people in the crowds said it was a moment to celebrate but they were also talking about the many lost relatives who died during the war.
"Our martyrs did not die in vain... We have waited for more than 56 years for this day," President Kiir said.
"It is a day that will be forever engraved on our hearts and minds," he added, before extending an amnesty to those who have taken up arms against the government of South Sudan.
There are at least seven active rebel groups in the south, one of the many challenges the new country faces.
Mr Bashir, who agreed the 2005 peace deal with the Sudan People's Liberation Army (SPLA), also spoke at the ceremony congratulating his "southern brothers".
"The will of the people of the south has to be respected," he said, adding that he hoped the south's independence would lead the US to lift sanctions against his country.
Other dignitaries attending the celebrations included former US Secretary of State Colin Powell and the US permanent representative to the UN, Susan Rice.
Meanwhile, in Khartoum, for most people it has been a low-key day, the BBC James Copnall reports from the northern capital.
However, scores of men gathered near the Blue Nile holding giant Sudanese flags and shouting: "Allahu Akbar [God is great].
"I'm very happy today. We feel this is our independence day too, our real independence day," one man said.
But not everyone in the north feels that way, our reporter says.
Famous actor Ali Mahdi told the BBC he was sad, although he respected the choice of South Sudanese.
He felt is could also be the opportunity for Sudan to become a more democratic country.
Under the Comprehensive Peace Agreement, a referendum was held on independence, which was approved by more than 99% of voters.
South Sudan is rich in oil, but is one of the least developed countries in the world, where one in seven children dies before the age of five.
Correspondents say keeping both the north and the south stable long after the celebratory parties have ended will be a challenge.
Fears of a new war resurfaced after recent fighting in two border areas, Abyei and South Kordofan, where some 170,000 people have been forced from their homes.
Separate deals - and the withdrawal of rival forces from the border - have calmed tensions.
But the two sides must still decide on issues such as drawing up the new border and how to divide Sudan's debts and oil wealth.
Citizenship is also a key sticking point. A new law passed by the National Assembly in Khartoum has withdrawn Sudanese citizenship from all southerners.
The UN refugee agency has urged both governments to prevent statelessness.
Both Sudan and the South are reliant on their oil revenues, which account for 98% of South Sudan's budget. But the two countries cannot agree how to divide the oil wealth of the former united state. Some 75% of the oil lies in the South but all the pipelines run north. It is feared that disputes over oil could lead the two neighbours to return to war.
Although they were united for many years, the two Sudans were always very different. The great divide is visible even from space, as this Nasa satellite image shows. The northern states are a blanket of desert, broken only by the fertile Nile corridor. South Sudan is covered by green swathes of grassland, swamps and tropical forest.
Sudan's arid north is mainly home to Arabic-speaking Muslims. But in South Sudan there is no dominant culture. The Dinkas and the Nuers are the largest of more than 200 ethnic groups, each with its own languages and traditional beliefs, alongside Christianity and Islam.
The health inequalities in Sudan are illustrated by infant mortality rates. In South Sudan, one in 10 children die before their first birthday. Whereas in the more developed northern states, such as Gezira and White Nile, half of those children would be expected to survive.
The gulf in water resources between north and south is stark. In Khartoum, River Nile, and Gezira states, two-thirds of people have access to piped drinking water and pit latrines. In the south, boreholes and unprotected wells are the main drinking sources. More than 80% of southerners have no toilet facilities whatsoever.
Throughout the two Sudans, access to primary school education is strongly linked to household earnings. In the poorest parts of the south, less than 1% of children finish primary school. Whereas in the wealthier north, up to 50% of children complete primary level education.
Conflict and poverty are the main causes of food insecurity in both countries. In Sudan, many of the residents of war-affected Darfur and the border states of Blue Nile and South Kordofan, depend on food aid. The UN said about 2.8m people in South Sudan would require food aid in 2013. The northern states tend to be wealthier, more urbanised and less reliant on agriculture.