Agency reports said Uzbek leader General Abdurrashid Dostum and Tajik General Attah Mohammad, who is known to be close to Afghanistan's Defence Minister Mohammed Qaseem Fahim, signed the peace pact in the northern city of Mazar-e-sharif after what many described as the worst clash between the two rivals in the past two years.
"It is worse than anything before," said Manoel de Almeida e Silva, a UN spokesman in Kabul. "Tanks have been used, which we have not seen in a long time."
The fighting came as President Ahmad Karzai's government announced plans to disarm over 100,000 militamen in an attempt to curtail the powers of provincial warlords who still rule the country's provinces outside the capital Kabul.
Interior Minister Ali Ahmad Jalali, who flew to negotiate the ceasefire in Mazhar-e-sharif, said, "This is the first step to ending the violence. We need deep reforms in both the military and the executive."
But most analysts say the long standing rivalry between Dostum and Mohammad, who head separate, well-armed militias, poses a serious threat to the UN sponsored disarmament programme.
Under Thursday's ceasefire agreement, both Dostum and Mohammad will withdraw their forces 30 miles in opposite directions from Mazar-e-sharif within the next two days.
Dostum's spokesman Faizullah Zaki told journalists, "General Dostum believes the entire region needs to be demilitarised and he is ready to do this. The people are tired of fighting. If this agreement fails, they are not going to stand for it."