A deal was reached last week that - if implemented - will see rebels evacuate from Homs and the siege of rebel-held neighborhoods ended with government control fully restored

DAMASCUS, Syria (AP) — A deal has been reached for thousands of insurgents to leave the last opposition-held neighborhood 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 neighborhood, 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 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 and take a maximum of two months.

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

Barrazi said some 60,000 people are still living in Waer, and that after the militants leave it will be easier to send food and other supplies into the neighborhood. 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 are al-Qaida's affiliate in Syria, the Nusra Front, as well as the powerful ultraconservative Ahrar al-Sham.

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 generated more than four million refugees. Hundreds of thousands of Syrians have fled to Europe in recent months, part of the largest refugee flow since World War II.

In an interview with Czech TV aired Tuesday, Assad said there could be "terrorists" among those fleeing the civil war. "The majority, let's say, is the good Syrian, the patriot, the natural people, but of course you have the infiltration of the terrorists among them," he said, speaking in English.

Also on Tuesday, Doctors Without Borders said seven people were killed and a hospital supported by the international medical charity was partially destroyed in a series of barrel bomb attacks by government forces in Homs province.

The group said a series of bombings occurred in the town of Zafarana on Saturday. It said local medical workers at the Zafarana hospital received an influx of 47 wounded patients, nearly half of them women and children under 15 years old.

"As the bombings continued and caused damage to the hospital, many of these patients had to be moved to other hospitals and five people died in transit," it said.