The two leaders swallowed personal distrust to reassure each other's parties
By Peter Martell
BBC News, Juba
Cheers of support rang out in Southern Sudan as President Omar al-Bashir said he would accept the result of a referendum next year - even if the oil-rich south voted for independence.
In the town of Yambio, where Mr Bashir was speaking at celebrations to mark five years since the end of the north-south war, the crowds shouted and waved the south's flag with wide smiles.
Mr Bashir said his northern National Congress Party did not want the south to secede, but would support the choice of the people.
It is a message dear to hearts of the people in the south.
"If the result of the referendum is separation, then we in the NCP will be the first to take note of this decision and to support it," said Mr Bashir, a soldier who spent long years battling to crush the southern rebel fighters.
It was his closest acknowledgement yet of the possibility of separation, and was well received.
Many were optimistic his unusually conciliatory tone bodes well for the south, where opinion on the streets seems overwhelmingly for separation.
Mr Bashir, in a broadcast shown on national television, joined the south's President Salva Kiir on top of an open pick-up truck, waving with his trademark stick to crowds in the packed stadium.
Both will have bitter memories of the long years they fought each other, yet they seemed keen to swallow any personal distrust to show the public that they can work together for the sake of their people.
Mr Bashir was even seen to nod in time to the music of a military parade in front of him by the south's army - former rebel fighters who were once his sworn enemies.
Even a mention of southern independence from Mr Bashir is a major turn from previous speeches, in which he suggested that unity was the only option.
His speech was widely watched in the north too, where there is a grudging acceptance the growing likelihood of a split.
But away from the euphoria of the crowds, many southerners remained sceptical.
In the southern capital, Juba, where people gathered to listen to scratchy radio broadcasts of the speeches, many said they still feared for the future.
"We have heard promises before from the Arabs, but they have not been kept," said Daniel Deng, a businessman at a tea-stall.
Tensions remain high between the two sides
"It is good news to hear that they will accept a free south Sudan, but until I am there to witness that day, I will not believe it."
Next year's referendum is part of the 2005 peace deal which brought to an end more than two decades of civil war fought over ethnicity, oil, religion and resources.
More than two million died in the conflict between the Arab-dominated, Muslim government in Khartoum, and rebels from the south, where most are Christians or follow traditional beliefs.
Tensions remain high between the two sides, with national and presidential elections due in April - the first multi-party ballot since 1986.
A stream of gloomy reports from aid agencies and analysts have in recent months warned of the risk of renewed war between the north and the south.
"We do not trust those in Khartoum," said motorcycle-taxi driver James Okot, who grew up as a refugee in Uganda after his village was destroyed during the war.
"If the north says they will let us be free and it is true, then I am very happy.
"But I think we should be ready in case they are not telling us the truth and they will not let us be independent."
Many in the south believe Mr Bashir and his allies have been arming rival ethnic groups in the south to destabilise the region, claims repeatedly rejected by the north.
The referendum on independence is next January
More than 2,500 people died in the south in violent clashes between rival groups last year - more than in the troubled western region of Darfur.
But the overall mood of the day was hopeful, with Mr Kiir stressing a message of peace, whatever the south may choose.
"Myself and my brother President Bashir are committed, not only to not take our people back to war, but to work together to ensure a peaceful and stable Sudan," said Mr Kiir, who is also Sudan's first vice-president.
"Therefore, we will exert every effort to overcome the remaining hurdles during this final journey and I urge you all to maintain the balance to stay on the lane of peace."
And, just as Mr Bashir sought to reassure the south over the independence vote that matters to them, Mr Kiir aimed to calm the north's main concern - the future of the country's oil reserves which lie mainly in the south.
"Before appropriate oil infrastructure is developed in southern Sudan, the oil produced in Southern Sudan will continue to flow from the south to north for processing and export," he said.
The war-weary people still worry about conflict, but for once at least in Sudan there was hope that peace may prevail.