Syrian rebels ousted an al-Qaeda-linked group from its local headquarters in a key northern city Wednesday, part of a widening campaign against the extremist group in opposition-held areas, activists said.

The capture of the base, formerly a children’s hospital in Aleppo, underscores the intensity of the rebel-on-rebel fighting that has raged for days between more-moderate factions and their onetime allies, fighters from the Islamic State of Iraq and Syria, or ISIS.

Meanwhile, two Swedish journalists who were abducted in Syria were released after a month and a half in captivity. Dozens of local and foreign journalists have been killed or kidnapped in Syria.

ISIS and another al-Qaeda-linked group, Jabhat al-Nusra, also known as the al-Nusra Front, initially joined forces with moderate rebels fighting to oust President Bashar al-Assad in a conflict that began in March 2011 as a popular uprising but morphed into a civil war. The extremists proved to be well-organized and efficient fighters, giving the ragtag rebels a boost. But Iraq-based ISIS began employing brutal tactics and trying to impose its strict interpretation of Islamic law, alienating other rebel factions and leading to some of the worst infighting of the conflict.

An ISIS spokesman vowed to crush the rival rebel groups.

“Know that we have armies in Iraq and Syria . . . we warn you,” the spokesman, Abu Mohammed al-Adnani, said in an audio clip posted overnight on militant Web sites. “We will crush them and kill the conspiracy in its cradle,” he said. The authenticity of the recording could not be independently verified.

The spokesman also declared war against Shiites in Iraq, Syria, Lebanon and Yemen, whom Sunni Muslim extremists consider their main enemy.

The fighting has spread from the northern province of Aleppo to nearby Idlib and Raqqah, a bastion of ISIS. At least 300 people have been killed in the past five days, said the head of the Britain-based Syrian Observatory for Human Rights, who uses the pseudonym Rami Abdulrahman.

The Observatory and other activist groups reported that dozens of detainees held by the extremists had been freed but that several others had been fatally shot.

The Observatory said 42 bodies were found at the hospital, including those of five activists and at least 21 fighters. Other activist groups reported that dozens of people were executed, but the reports and numbers could not be confirmed.

— Associated Press