Dozens of insurgents began evacuating their last stronghold in Syria's central city of Homs Wednesday as part of a local deal with government forces that allows them safe passage to areas in the country's north.

The governor of Homs, Talal Barazzi, told The Associated Press on the outskirts of Waer that at least 320 gunmen are scheduled to leave the district on Wednesday. A few thousand insurgents have been holed up in Waer, which government forces had blockaded for nearly three years, only sporadically allowing in food.

Once the evacuation is completed the city of Homs will fully return to government control.

Fifteen buses were on site Wednesday to evacuate the gunmen who were expected to go to areas further north in Hama and Idlib province. They include members of the Al Qaeda branch in Syria, the Nusra Front, and an array of extremist and more moderate rebels fighting to topple President Bashar Assad.

Around 300 civilians, mainly women and children, are also being evacuated from Waer as part of the deal. They included 20 wounded civilians who were loaded into ambulances waiting just outside.

An AP reporter saw at least one person with a prosthetic leg walking on crutches getting into a bus.

"With this agreement, Homs will now be a safe place free of weapons and gunmen," Barazzi said.

The agreement also stipulates that the government release an unspecified number of prisoners from Syrian jails, in addition to the release of some civilians and militants who were kidnapped by the gunmen in Waer.

The Waer deal is similar to one struck in May 2014 in Homs' Old City. There, the government assumed control of the quarter after about 2,000 rebels were granted safe passage to opposition areas north of Homs. The area was destroyed and thousands of civilians were killed or forced to flee, and rebels surrendered only after they were starved and outgunned.

The international community is making its most serious push yet for a cease-fire and peace talks to end the conflict that began in 2011. Many hope that such local deals can be replicated across Syria to create pockets of peace and a climate conducive to talks leading up to a transitional government.

The United Nations is presiding over implementation of the deal Wednesday.