JUBA: South Sudan overwhelmingly voted to split from the north in a referendum intended to end decades of civil war, officials said Sunday, sparking mass celebrations in the southern capital Juba. Thousands cheered, danced and ululated after officials said 99.57 percent of voters from the south's 10 states had chosen to secede, according to the first official preliminary results. “This is what we voted for, so that people can be free in their own country ... I say congratulations a million times,” south Sudan President Salva Kiir told the crowd. The vote was promised in a 2005 peace deal which ended decades of north-south conflict, Africa's longest civil war, which cost an estimated two million lives. Kiir, the head of the former southern rebel Sudan People's Liberation Movement (SPLM), praised Sudanese President Omar Hassan Al-Bashir, for agreeing to the 2005 accord. “Omar Al-Bashir took the bold decision to bring peace. Bashir is a champion and we must stand with him,” said Kiir, speaking in a mixture of English and the local Arabic dialect. “The project has not finished ... We cannot declare independence today,” he added. According to the terms of the accord, south Sudan will be able to declare independence on July 9, pending any legal challenges to the results. Northern and southern leaders still have to agree on their shared border, how they will split oil revenues after secession and the ownership of the disputed Abyei region. UN Secretary General Ban Ki-moon welcomed the peaceful vote but told an African Union summit in Addis Ababa he was still concerned about the unresolved issues. Washington's Sudan envoy Scott Gration told Reuters at the summit the “tough part” of the peace deal was still to come. “These issues, whether it be borders or citizenship or oil revenues, cannot be solved unless there is an effort (by north and south) to work together in a partnership,” he said. Chan Reek Madut, the deputy head of the referendum commission, told the crowd in Juba almost 3.7 million people in the south had voted for separation, against just 16,129 for unity. Turnout was 99 percent, he added. The final combined results, including votes from southerners in north Sudan and eight other countries, are due to be released in early February. The commission's website reported Sunday that incomplete figures showed the overall vote for separation was 98.83 percent, but said this figure could change.