Sudan's President Omar al-Bashir and the southern leader Salva Kiir are to use international arbiters in a dispute over the contested town of Abyei.
An estimated 50,000 people fled from the oil-rich area during violent clashes last month which many feared could reignite a bloody civil war.
After intense negotiations the two sides have now agreed on an interim administration for Abyei.
The region's boundary is to be decided by international arbitration.
Abyei has been at the heart of a long-standing dispute that threatens a 2005 peace deal which ended years of war.
At stake is control of a large part of the country's oil wealth.
Both the North and former rebels from the South want the oil fields around Abyei to be part of their own territories, and they cannot agree on the boundary for the area.
Tens of thousands fled their homes in Abyei during May's fighting
New joint army units and police will be deployed to the town and measures will be taken to help thousands of displaced people return home, says the BBC's Amber Henshaw in Khartoum.
Both the army and the former rebel Sudan People's Liberation Army (SPLA) suffered heavy losses after the SPLA launched attacks with tanks in the area last month.
The 20-year north-south civil war, separate from the Darfur conflict, was said to have cost 1.5 million lives.
Under the 2005 peace deal, the SPLA joined a government of national unity.
As part of the deal, nationwide elections are due to take place next year, to be followed in 2011 by a referendum on whether the south should secede.