BEIRUT — The Obama administration’s Syria strategy suffered a major setback Sunday when fighters linked to al-Qaida routed U.S.-backed rebels from their main northern strongholds, capturing significant quantities of weaponry, triggering widespread defections and ending hopes that Washington will readily find Syrian partners in its war against the Islamic State.

Moderate rebels who had been armed and trained by the United States either surrendered or defected to the extremists as the Jabhat al-Nusra group, affiliated with al-Qaida, swept through the towns and villages the moderates controlled in the northern province of Idlib, in what appeared to be a concerted push to vanquish the moderate Free Syrian Army, according to rebel commanders, activists and analysts.

Other moderate fighters were on the run, headed for the Turkish border as the extremists closed in, heralding a significant defeat for the rebel forces Washington had been counting on as a bulwark against the Islamic State.

Moderates still retain a strong presence in southern Syria, but the Islamic State has not been a major factor there.

Jabhat al-Nusra has long been regarded by Syrians as less radical than the breakaway Islamic State faction, and it had participated alongside moderate rebels in battles against the Islamic State earlier this year. But it is also on the U.S. list of terrorist organizations and is the only group in Syria that has formally declared its allegiance to the mainstream al-Qaida leadership.

A Jabhat al-Nusra base was one of the first targets hit when the United States launched its air war in Syria in September, and activists said the tensions fueled by that attack had contributed to the success of the group’s push against the moderate rebels.

“When American airstrikes targeted al-Nusra, people felt solidarity with them because Nusra are fighting the regime, and the strikes are helping the regime,” said Raed al-Fares, an activist leader in Kafr Nabel, in Idlib.

“Now people think that whoever in the Free Syrian Army gets support from the U.S.A. is an agent of the regime,” he said.

Fleeing rebel fighters said they feared the defeat would spell the end of the Free Syrian Army, the umbrella name used by the moderate rebel groups that the United States has somewhat erratically sought to promote as an alternative both to the regime of Syrian President Bashar Assad and the extremist Islamic State.

Among the groups whose bases were overrun in the assault was Harakat Hazm, the biggest recipient of U.S. assistance offered under a small-scale, covert CIA program launched this year, including the first deliveries of U.S.-made TOW antitank missiles. The group’s headquarters outside the village of Khan Subbul was seized by Jabhat al-Nusra overnight Saturday, after rebel fighters there surrendered their weapons and fled without a fight, according to residents in the area.

Hussam Omar, a spokesman for Harakat Hazm, refused to confirm whether American weaponry had been captured by the al-Qaida affiliate because, he said, negotiations with Jabhat al-Nusra are underway.

Harakat Hazm, whose name means “Steadfastness Movement,” had also received small arms and ammunition alongside non-lethal aid in the form of vehicles, food and uniforms from the United States and its European and Persian Gulf Arab allies grouped as the Friends of Syria alliance. Scores of its fighters had received U.S. training in Qatar under the covert program, but it was also not possible to confirm whether any of those fighters had defected to the al-Qaida affiliate.

Another Western-backed group, the Syrian Revolutionary Front, on Saturday gave up its bases in Jabal al-Zawiya, a collection of mountain villages that had been under the control of the pro-American warlord Jamal Maarouf since 2012.