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.