Syria agreed on Wednesday to the terms of an Arab League peace plan aimed at ending more than seven months of bloodshed and opening talks with government opponents on ways to move the country toward democracy.

But on a day when at least 34 people were reported killed in the central provinces of Homs and Hama, most of them in what appeared to be acts of sectarian vengeance, it was unclear whether the deal would stop the rapidly escalating violence.

Under the terms of the plan, Syria is to withdraw the army from cities and towns, release all political prisoners, and permit access to members of the media, human rights groups and Arab monitors, according to a statement issued by the Arab League.

Within two weeks, the Syrian government is supposed to begin talks with the opposition, which has refused all dialogue unless the regime ends its crackdown, allows protests and releases prisoners. It was unclear whether the discussions would take place in Cairo, as the plan stipulates, or Damascus, which the Syrian government wants. A Syrian government official said that detail is still under discussion.

Qatari Prime Minister Sheik Hamad Bin Jasim al-Thani, who played a key role in securing the deal, stressed that it is important for Syria to act swiftly to carry it out. “We are happy to have reached this agreement and we will be even happier when it is implemented immediately,” he told a news conference after a ministerial meeting in Cairo.

If the plan were implemented, it would mark a significant breakthrough in the nearly eight-month-old standoff between the Assad government and a stubbornly persistent protest movement that has refused to stop demonstrating despite the crackdown, in which at least 3,000 have died and tens of thousands have been detained.

But many opposition figures, activists and analysts expressed skepticism that Syria is serious about ending its crackdown or holding meaningful dialogue with the opposition.

“The Assad regime is lying and buying time,” said Radwan Ziadeh, a Washington-based member of the newly created Syrian National Council, which was established in Istanbul to represent the opposition. “Assad will not stop the killings, because if he does he will have millions of protesters taking to the streets.”

In Washington, the State Department responded coolly and reiterated the U.S. position that Assad should step down.

“There is a risk here that they are trying to string out diplomacy, that they are trying to offer their own people half-steps or quarter-measures rather than taking the real steps,” State Department spokeswoman Victoria Nuland said of the Syrian government. “Let’s see what they actually do.”

The skepticism is justified, said Salman Shaikh, director of the Brookings Doha Center in Qatar. Assad has on numerous occasions in the past offered to release prisoners and pull back troops, only to intensify the crackdown against the protest movement.

The initiative does, however, represent an achievement for the Arab League, which has for months been unable to muster a united front against the Syrian government. If Syria does not abide by the plan, “this could have a catalytic effect on the international community and at the U.N. . . . to intensify the pressure,” Shaikh said.

But the surge of violence in Homs seemed to call into question whether it will even be possible to stop the killing and underscored the extent to which the standoff between the government and protesters risks turning into a full-blown sectarian conflict, at least in some parts of the country.

The bloodshed began on Tuesday evening when nine men drawn mostly from Assad’s minority Alawite sect were shot dead on a bus by unidentified gunmen who ordered women off and then shot the men, said Mohammed Salman, a Homs activist.

On Wednesday morning, 11 Sunni workers were found shot dead execution style at a tissue factory in the nearby town of Houla in an apparent act of revenge, said Rami Abdelrahman of the London-based Syrian Observatory for Human Rights. A video posted on YouTube showed the bodies of some of the men, their hands bound, with gunshot wounds to their heads.

Later Wednesday, gunmen ambushed a military convoy in neighboring Hama province and killed 15 members of the security forces in retaliation for the shooting of the Sunnis at the factory, Abdelrahman said. Eight other people were killed by security forces in scattered incidents around Homs, he said.

Homs residents denied that the killings were sectarian and said the government was stoking tensions to justify a continued crackdown. Those killed on the bus were members of the security forces “involved in crimes against the Syrian people,” said Fady, an activist who asked that his full name not be used to protect his safety. “This is not about Sunni and Alawite, and never will be.”

Staff writer Joby Warrick in Washington contributed to this report.