BEIRUT, Lebanon — Syrian security forces mounted violent raids on neighborhoods in Homs, the restive central Syrian city, on Wednesday, hunting for a group of soldiers who defected to the opposition early in the day, activists said. They estimated that more than 20 people had been killed in those raids and other clashes.

Syrian troops also raided a village in Qamishli, in northeastern Syria along the border with Turkey, in a hunt for Mohammed Adnan al-Bakkour, a senior official who went over to the opposition. Mr. Bakkour resigned last week as attorney general of Hama, a province in central Syria, in protest of the brutal crackdown against pro-democracy activists since the popular uprising against President Bashar al-Assad started in mid-March.

Across Syria, residents and activists have reported the defection of hundreds of soldiers from the mostly Sunni army, which is led by officers from the minority Alawite sect, to which Mr. Assad belongs. All told, the activists estimate, about 700 soldiers have gone over to the opposition since mid-March. Scores more have reportedly been killed for refusing to shoot at unarmed protesters, and others have simply deserted and gone into hiding.

Activists hope that the defections will weaken the army and eventually help in getting rid of Mr. Assad. But other observers noted that the deserters were mainly low in rank and that they were not numerous enough yet to significantly weaken the army.