BEIRUT, Lebanon — Fighters from the fastest-growing Qaeda franchise in Syria have repeatedly clashed with other rebel brigades, seizing towns, replacing crosses on churches with black flags and holding classes to teach Syrian children about the importance of battling “infidels,” meaning anyone who is not a Sunni Muslim.

Since the group, the Islamic State in Iraq and Syria, or ISIS, announced its presence in Syria this year, it has emerged as the leading force for the foreign fighters streaming into the country, exploiting the chaos of the civil war as it tries to lay the groundwork for an Islamic state.

“They want to carve out a jihadi state or a jihadi territory and obviously anything above that is gravy, like overthrowing the Assad regime,” said Bruce Hoffman, director of the Center for Security Studies at Georgetown University. “I don’t think they have ambitions of taking over the entire country, although they’d be happy to.”

While the Syrian rebels initially welcomed the group as a powerful ally in the civil war against President Bashar al-Assad, many now resent it for putting its international jihadi agenda ahead of the fight to topple the government. Antigovernment activists say they detest the group’s brutality and imposition of strict social codes, and even other Islamist rebels say the struggle’s focus should remain on leadership change.