DAMASCUS, Syria -- A deal has been reached for thousands of insurgents to leave the last opposition-held neighbourhood in the central city of Homs and for state institutions to return to the area, an opposition monitoring group and a Syrian official said Tuesday.

Homs residents were among the first to rise up against President Bashar Assad in 2011, and the city was once known as "the capital of the revolution." Government forces gradually retook the entire city except for the Waer neighbourhood, where the latest deal was reached. The departure of the insurgents will leave Syria's third largest city under complete government control.

The Britain-based Syrian Observatory for Human Rights said some 3,200 fighters will leave the Waer for other areas in Syria held by insurgents. The group said the deal, agreed to by the government and several rebel factions, will also include a cease-fire, release of prisoners and the return of state institutions.

Homs Governor Talal Barrazi told The Associated Press that the implementation of the deal will begin early next week. He added that the government has no exact figure for the number of fighters inside Waer, adding that the first batch of gunmen to leave will be 300 and will head to northern Syria.

Assad loyalists have been blockading Waer since early 2013, only sporadically allowing in food. The area witnessed sporadic clashes over the past two years.

Barrazi said that after militants leave Waer it will be easier to send food and other supplies into the neighbourhood. He added that an aid convoy entered Waer on Monday and another was sent in last week.

Waer-based opposition activist Bebars al-Talawy said there are about 45 militant factions in Waer and they all agreed to the deal. He said the most prominent factions in Waer are al-Qaida's affiliate in Syria, the Nusra Front, as well as the powerful ultraconservative Ahrar al-Sham.

He added that the neighbourhood has not witnessed clashes for about a month.

Barrazi said some 60,000 people are still living in Waer. He added that the deal will be implemented in three stages within a maximum of two months.

In May 2014, some 1,200 fighters and civilians left central Homs in a similar deal.

On Monday, some 100 opposition fighters left the western Damascus suburb of Qudsaya as part of a deal to return the area to government control, state news agency SANA said. It added that more fighters will leave on Tuesday.

Syria's conflict has killed more than 250,000 people and wounded at least a million.

Mroue reported from Beirut.