Syrian rebels pinned down al-Qaeda-linked militants Monday in their stronghold of Raqqah, a north-central city, escalating a battle that has weakened the extremists and expelled them from a string of towns and villages in Syria.

Prisoners were released as the militants from the Islamic State of Iraq and Syria, or ISIS, were driven out of several buildings in Raqqah. Clashes raged around the governor’s building, the group’s headquarters in the city.

The al-Qaeda affiliate has been forced to make a series of withdrawals over the past four days since other rebel groups, including Islamists, launched a coordinated bid to oust it from northern Syria. The offensive comes just weeks before a scheduled peace conference in Geneva, giving the beleaguered rebels a public-
relations boost ahead of the meeting.

After making a chilling and high-profile entry onto the Syrian battlefield in May with a public execution in Raqqah’s main square, ISIS, formerly called the Islamic State of Iraq, quickly extended its sphere of influence amid the chaos in Syria’s rebel-held regions.

But the group, estimated to number about 6,000 fighters, has spread itself thin. It was pushed from a swath of villages and towns in Aleppo and Idlib provinces last week.

The joint rebel force claimed to have expelled ISIS from Raqqah’s post office and another of its bases Monday, freeing prisoners.

“It was like Guantanamo,” one man said in a video posted online Monday. He was part of a group of at least 20 prisoners who were reportedly held by ISIS. The group has built a reputation for kidnappings and intimidation, leading to angry demonstrations against ISIS last week.

The battles against the extremists are being fought by a tangle of groups with competing local interests. The offensive has been led by the Syrian Revolutionaries Front and the newly formed Jaish al-Muhajireen — both affiliated with the Western-backed Supreme Military Council; that body, however, lacks command and control. They have been joined by fighters from the Islamic Front, a powerful grouping of Islamist rebel units that was formed late last year.

Lt. Col. Mohammad al-
Abboud, the Supreme Military Council’s representative for the eastern front, which includes Raqqah, said he expected that it will take at least a week to drive the ISIS fighters from the city. He said that at least 20 rebels had died since fighting broke out in Raqqah on Sunday night, though a number of bodies were impossible to retrieve because of sniper fire. He estimated that about 70 ISIS members were killed. Videos showed black-clad militants lying dead in the streets.

The timing gives rebel forces a chance to present themselves as a counterweight to al-Qaeda at the Syria peace conference, scheduled for Jan. 22 in Geneva.

“The direct reason why we started the fight is because the acts of the Islamic State weren’t bearable anymore,” Abboud said. “But we can’t deny that there are strategic reasons. One is to show we are a national army that is not conservative and extremist and to show we are supporting our people.”

Still, with the Supreme Military Council little more than a “figurehead,” said Salman Shaikh, director of the Brookings Doha Center in Qatar, the challenge will be to get an opposition delegation to the table that represents fighting groups on the ground.

“Geneva is on the road to ruin,” he said. “We are looking at a landscape whereby people on the ground have moved on, though the international effort continues.”

The United Nations said it sent out invitations to the talks Monday. State Department officials said they see little chance of including Iran as an official participant; one said it was also “less likely than likely” that Iran could play a role even on the sidelines. The officials spoke on the condition of anonymity on the grounds that the United Nations, not the United States, is the conference host.

Iran, nevertheless, could do several things to demonstrate good faith, the officials said, such as urging the Syrian government — Tehran’s ally and military client — to stop the bombardment of civilians in Aleppo and elsewhere and encouraging better access for humanitarian organizations in conflict areas.

Those steps could help “predispose” opponents of any Iranian participation to change their minds, one official said.

Iran would not have to announce its intercession but could play a helpful role behind the scenes, one official said, adding: “Public or private, we’d take it either way.”

Ahmed Ramadan in Beirut and Anne Gearan in Brussels contributed to this report.