BEIRUT (Reuters) - Preparations began on Tuesday to evacuate the Shi’ite populations of two Syrian towns in exchange for moving Sunni rebels and civilians out of two others in a deal between the warring sides, a monitor and a pro-government commander said.

The pro-government Shi’ite towns of al-Foua and Kefraya in the northwestern province of Idlib are encircled by insurgent fighters. The rebel-held towns of Zabadani and Madaya near the Lebanese border are under siege by pro-government forces, including Hezbollah.

The Syrian Observatory for Human Rights, a British-based war monitoring group, said convoys were moving toward the four towns and evacuations were expected to start on Wednesday morning.

A military commander in the alliance fighting in support of Syrian President Bashar al-Assad said buses were on the way to the towns and that the combatants would also swap hostages under the deal.

“It has been decided that tomorrow the agreement will be carried out,” said the commander, a non-Syrian, speaking on condition of anonymity.

Assad’s government has received backing in the six-year-old conflict from Russia, Iran and Shi’ite militias from countries including Iraq, Lebanon and Afghanistan.

A military media unit run by Hezbollah, the Lebanese Shi’ite movement, said 19 hostages were transferred out of al-Foua and Kefraya on Tuesday and would be sent to Idlib under the supervision of the Syrian Arab Red Crescent. In return, rebel groups released several prisoners and seven bodies, it said.

The Syrian government has struck numerous local deals with besieged rebels under which they leave for insurgent-held parts of northern Syria that border Turkey.

The opposition calls it a deliberate policy of demographic change to forcibly displace Assad’s opponents away from the main cities of western Syria.

The Observatory said Qatar mediated the agreement to evacuate the four towns between Iran and Tahrir al-Sham - a jihadist alliance - with the involvement of Hezbollah.

Tahrir al-Sham was formed from a merger of several Islamist factions and Syria’s former al-Qaeda affiliate, known as the Nusra Front until it cut ties with al-Qaeda last year.

A pro-Damascus source familiar with the details said Hezbollah and Tahrir al-Sham had reached the deal with Qatari guarantees.

Sources on the rebel side could not immediately be reached for comment.

Thousands of rebel fighters and their relatives would depart for Idlib, while thousands of people would leave al-Foua and Kefraya for government-held parts of Aleppo province, the pro-government military commander said.

Residents of the four towns started registering their names to leave and combatants began opening up the roads, according to the Observatory, which called it the biggest population swap agreement of its type.

Observatory director Rami Abdulrahman has described the deal as “demographic change on a sectarian basis”.

The agreement would also include a ceasefire covering areas south of Damascus, aid deliveries, and the release of 1,500 prisoners held by the government in connection with the uprising against Assad, the Observatory said.

Fighters and civilians have poured into rebel-held Idlib at an accelerating rate over the last year, bussed out of other parts of Syria that the government and its allies captured.