CAIRO — American military drones monitored Islamic State militants loading up hundreds of cars, buses and trucks with fighters and civilians and fleeing the city of Manbij, Syria, on Friday, as Syrian rebels advanced and the extremists lost yet another stronghold.

On Wednesday, the Libyan city of Surt, held by the Islamic State for more than a year, also fell to pro-government militiamen, and the militants lost the headquarters from which they had ruled more than 150 miles of Libyan coastline.

The two new victories against the Islamic State, also known as ISIS or ISIL, could have a significant effect on the group’s efforts to penetrate the West.

Manbij is the site of one of just two crossings to Turkey from Syria, and its fall will probably deprive the extremists of that route. The other major crossing, al-Rai, is often under attack by anti-Islamic State factions. The route between Manbij and Jarabulus, Syria, has been used by foreign jihadists to join the Islamic State in Syria, or to leave again for European destinations. Manbij is also the largest city the group has lost in Syria.