JUBA, Sudan - North and south Sudan have agreed to establish a jointly patrolled demilitarized border zone between the two sides as the south prepares to declare independence in July, the African Union said Tuesday.

Such a buffer could lower the chances of an accidental north-south clash. But its implementation depends on the two sides reaching an agreement over the demarcation of the border, an issue that has long been contentious.

The deal could also be disrupted by other outstanding issues, such as the sharing of oil rights between north and south.

Also on Tuesday, Sudan informed the United Nations in New York that it wants the U.N. peacekeeping force to leave its territory when South Sudan becomes independent on July 9, stressing its commitment to peace with its new neighbour at a time of heightened tension.

AU adviser Alex de Waal, who has facilitated negotiations on security issues between Sudan's north and south regions, said the parties agreed Monday during talks in Ethiopia's capital to form a common, demilitarized zone stretching across the 1,300-mile (2,100-kilometre) north-south border. It's not yet known when the zone will go into effect.

The zone will stretch 6 miles (10 kilometres) north and south from the 1956 border, the tentative line drawn when Sudan became independent from Britain, de Waal said.

De Waal told The Associated Press by phone from Addis Ababa that discussions over a third-party military monitoring body -- a U.N. peacekeeping force, for instance -- were still to come.

Col. Philip Aguer, spokesman for the south's army, said the southern military will support the agreement "100 per cent" if both sides can agree where the actual border is.

"To me that is a good agreement, but the issue now is where is the border," he said.

North and south Sudan fought two civil wars off and on over more than four decades before signing a 2005 peace deal. But the sides' relations took a nosedive earlier this month when the northern Sudanese army invaded and seized the disputed border town of Abyei.

The military action came after months of building tensions between the two armies in Abyei, a fertile, oil-producing border zone which both the north and south claim. It sent an estimated 80,000 residents of the area running for their lives, fleeing into villages and towns in the southern state of Warrap, which is now experiencing what Western diplomats and U.N. humanitarian officials have called a perfect storm of factors resulting in food, fuel, and shelter shortages.

De Waal said the agreement to establish a demilitarized border zone provides a model for solving the Abyei crisis. He called the deal a necessary step between the two parties that will allow the Sudanese government to take the necessary action to demilitarize Abyei.

Since the Sudanese Armed Forces invaded the town of Abyei on May 21 with tanks, heavy artillery and air cover, the U.N. Security Council and a host of Western nations have repeatedly condemned the act. President Obama's special envoy to Sudan called it a disproportionate response to an attack by the southern army on a U.N.-escorted northern military convoy in the area on May 19.

The Security Council has called for the immediate and unconditional withdrawal of the northern army from Abyei, but the government of President Omar al-Bashir has not made any concessions. On the evening of May 26, the northern army bombed and destroyed the strategic bridge across the Bahr el Arab, called the River Kiir by southerners, which forms the 1956 border in the area.

De Waal expressed optimism that the agreement will provide a basis for re-establishing co-operative relations between north and south at a time when a number of key issues related to the future of the two regions remain unresolved.

Sudan's U.N. Ambassador Daffa-Alla Elhag Ali Osman said he delivered a letter to Secretary-General Ban Ki-moon earlier Tuesday rejecting the U.N. chief's proposal for a three-month extension of the mandate for its 10,400-strong peacekeeping force.

Ban had said he wanted the extension to assist both sides to maintain calm and resolve outstanding issues, especially the future of Abyei.