* Syrian army advances along Lebanese border
* Crusader castle is a UNESCO World Heritage site
* Shells land in Lebanon (Recasts, adds quote from academic)
By Oliver Holmes
BEIRUT, Lebanon, March 20 (Reuters) - Syrian soldiers have raised the national flag on the battlements of a 900-year-old Crusader castle after a three-month siege that ended on Thursday when rebel fighters fled.
The recapture of Crac des Chevaliers, a UNESCO World Heritage site, is a real and symbolic victory over divided rebel factions.
The army has also wrested back control of most of al-Hosn, the town below the hilltop castle, which was surrounded by Syrian troops for weeks until many rebels moved out on Thursday morning and the army moved in, according to residents.
"The Syrian Arab Army raised the national flag on al-Hosn Castle in Homs province after eliminating the terrorists holed up in it," Syrian state television said.
The army's siege of Crac des Chevaliers echoes the tactic used by the Mamluke Islamic dynasty in the 13th century against Crusaders in the fortress.
The Syrian army's advance is part of a campaign to secure towns and villages along the Lebanese border as well as a highway from the capital Damascus to the coast that is vulnerable to rebel attack.
The castle is one of the best preserved in the world but suffered mortar hits as rebels sheltered behind its thick stone walls, built for battles hundreds of years ago.
"Crac des Chevaliers is the best example of medieval Syrian castle architecture. It has a unique importance for the area," said Konrad Hirschler of the University of London.
Syria's three-year-old conflict has devastated whole city neighbourhoods and ancient sites including Aleppo's medieval covered market and Umayyad mosque. Looting has threatened tombs in the desert town of Palmyra and Roman temples have been damaged.
Dozens of wounded Syrian rebels fleeing al-Hosn were ambushed as they attempted to cross a river into Lebanon on Thursday morning, Lebanese medical sources said.
The sources said 41 wounded rebels were taken into a hospital in north Lebanon. A further eight were carried in dead or succumbed to their wounds after managing to escape Syria into Wadi Khaled, said the medical sources, who requested anonymity.
Syrian state television said soldiers had killed 11 rebels.
LEBANON SUCKED IN
The fall of al-Hosn and the castle follows an army takeover on Sunday of Yabroud - one of the last rebel-held towns along the Damascus-Homs highway - and will further cut rebel supply routes.
The Syrian army campaign has accelerated the deterioration of Lebanon's security and stability, raising local sectarian tensions as thousands of refugees flood into the country.
As rebel fighters fled, Syrian army shells hit villages in Wadi Khaled, Lebanon's National News Agency said.
Lebanese frontier towns have been used by rebels as a refuge and have been attacked by Syrian helicopters and rockets.
Lebanese Shi'ite militant group Hezbollah has sent fighters into Syria to support President Bashar al-Assad, while Syrian rebels and their Sunni Lebanese allies have set off bombs in Shi'ite areas and fired rockets at Shi'ite towns inside Lebanon.
The Syrian Observatory for Human Rights, an anti-Assad monitoring group based in Britain, said displaced civilians were also killed on Thursday while trying to escape al-Hosn.
More than 140,000 people have been killed in the Syrian conflict, which has become increasingly sectarian as rival regional powers have backed either Assad, a member of the Shi'ite offshoot Alawite sect, or the majority Sunni rebels. (Additional reporting by Nazih Saddiq in Tripoli, Lebanon; Editing by Andrew Roche)