The peace agreement between the government and the Ahlu Sunnah group was signed Monday night at the headquarters of the African Union in Addis Ababa, Ethiopia, according to the United Nations.
"The agreement with Ahlu Sunnah is a historic success for the Somali people and it is a further positive step for the full return of Somalia's nationhood," President Sheikh Sharif Sheikh Ahmed said.
Ahlu Sunnah is a large, moderate Sunni-based religious movement influenced by Sufi Islam that has been fighting extremists from such militant groups as Al-Shabaab for about a year.
The United States considers Al-Shabaab, the al Qaeda proxy in the country, a terrorist organization. The group is waging a war against Somalia's government in an effort to implement a stricter form of Islamic law, or sharia.
"We preach peace and harmony among all nations and races of the world, but recently new and violent Islamist groups have surfaced in our country," said Ahlu Sunnah's spiritual leader, Sheikh Mohamud Sheikh Hassan. "We have united with the Somali government and fight against these violent groups together and this is not a fight or a struggle against people, it is against ideology.
"The meaning of this agreement is to save the people of Somalia and the reputation of the Islamic faith."
The U.N. special envoy to Somalia, Ahmedou Ould-Abdallah, said Monday that the agreement is a signal "things can and are changing in Somalia."
Somalia has not had a stable government since 1991, and fighting between the rebels and government troops has displaced thousands and escalated the humanitarian crisis in the famine-ravaged country. In the most recent violence, at least 75 people were killed last week in clashes between Al-Shabaab rebels and government forces, according to medical sources in the area.