Warring sides in the brutal two-year conflict in Ethiopia's Tigray have declared they had set the goal of "permanently" ending the fighting, agreeing to a truce backed by a programme of disarmament and integration of rebels.

"We have agreed to permanently silence the guns and end the two years of conflict in northern Ethiopia," the Ethiopian government and Tigray People's Liberation Front (TPLF) said in a joint statement after marathon talks in South Africa.

The breakthrough was announced by the African Union's mediator, former Nigerian president Olusegun Obasanjo.

"The two parties in the Ethiopian conflict have formally agreed to the cessation of hostilities as well as the systematic, orderly, smooth and coordinated disarmament," he said at a press conference in Pretoria

The agreement marked a new "dawn" for Ethiopia, he said.

The joint statement said the two sides "concluded a peace agreement" following "intensive negotiations."

According to US estimates, as many as half a million people have died in the war

They notably agreed on a programme of "disarmament, demobilisation, and reintegration for TPLF combatants, taking into account the security situation on the ground," it said.

The more than week-long talks marked the first formal dialogue for ending a war that has killed hundreds of thousands and unleashed a humanitarian crisis.

The Tigrayan rebels hailed the deal and said they had made "concessions."

"We are ready to implement and expedite this agreement," said the head of their delegation, Getachew Reda.

"In order to address the pains of our people, we have made concessions because we have to build trust."

"Ultimately, the fact that we have reached a point where we have now signed an agreement speaks volumes about the readiness on the part of the two sides to lay the past behind them to chart a new path of peace," said Mr Getachew.

The conflict erupted on 4 November, 2020, when Addis Ababa sent troops into Tigray after accusing the TPLF, the regional ruling party, of attacking federal army camps.

According to US estimates, as many as half a million people have died in the war.

The conflict also triggered a humanitarian crisis, forcing well over two million people from their homes.

"We've agreed that the government of Ethiopia will further enhance its collaboration with humanitarian agencies to continue expediting aid towards those in need of assistance," the joint statement said.

The United States hailed the agreement, with State Department spokesman Ned Price saying it represents "an important step towards peace".