BEIRUT (Reuters) - Syrian soldiers have taken control of most of the town of Rastan from deserters and gunmen, an activist said on Saturday, after the most prolonged armed clashes of the six-month uprising against President Bashar al-Assad. Rami Abdel-Rahman, head of the British-based Syrian Observatory for Human Rights, said a force of 250 tanks was sent to the region on Friday and the army was deployed across 80 percent of Rastan. Communication with the town of 40,000 people, 180 km (110 miles) north of Damascus, was difficult but Abdel-Rahman said a resident who managed to escape early on Saturday reported heavy gunfire throughout the night. Syria says it is fighting terrorists there. The state news agency said on Friday seven soldiers and police were killed in the operation but had succeeded in inflicting big losses on the armed terrorist groups. The United Nations says 2,700 people have been killed in President Bashar al-Assads crackdown since the mostly peaceful protests erupted in March, inspired by Arab revolts which have toppled three North African rulers and rattled leaders across the Middle East. The United States and Europe have condemned the violence and imposed sanctions on Syrian oil exports, while regional powers have also criticized the repression. The oil embargo, combined with a slump in tourism revenues and falls in foreign investment and trade, have pushed Damascus to take drastic steps to protect currency reserves. Last week it barred most imports apart from basic goods and raw materials. It also has tried unsuccessfully to barter crude oil for badly needed fuel. Assad is a member of Syrias Alawite minority sect, an offshoot of Shiite Islam that dominates the army, security apparatus and power structure in the mostly Sunni Muslim country of 20 million at the heart of the Middle East. He has blamed the violence on armed gangs backed by foreign forces, and his officials say 700 police and soldiers have been killed. The state news agency said three members of a military engineering unit were killed on Friday as they tried to defuse an explosive device planted in Douma, north of Damascus, at a site where people were expected to gather after weekly prayers. Three other devices were successfully dismantled in the south and east of the country, it said. Assad retains control over most of the military and security forces but army deserters, many of whom are reported to have defected because they refused to shoot at protesters, have formed rebel units in areas around Rastan. Residents say at least 1,000 deserters and armed villagers have been fighting loyalist forces, who are backed by tanks and helicopters. One activist said army defectors formed only a small part of the armed resistance.