BEIRUT — The U.S.-led coalition and local officials said Saturday that Syrian Islamic State fighters and civilians will be allowed to evacuate Syria’s Raqqa, in a deal that signals the imminent capture of the city but flouts earlier U.S. protests of negotiating safe exits for the extremist group.

Foreign fighters will be excluded from the evacuation deal, the coalition said.

The Syrian military also announced that its forces and allied fighters have seized the town of Mayadeen, an Islamic State stronghold in the country’s east.

With the fall of Mayadeen and retaking of Raqqa, Islamic State fighters are losing two of their last strongholds in Syria as their self-declared caliphate crumbles. The militants are currently besieged in the city of Deir el-Zour, leaving them with one last major urban bastion, the strategic town of Boukamal, on the border with Syria and Iraq.

Over the past months, Mayadeen had become a refuge for the Islamic State’s leadership as they faced an intense crackdown in Syria and Iraq.

Mayadeen, on the western bank of the Euphrates River, was also a major node in the race for control of the oil-rich eastern Deir el-Zour province that straddles the border with Iraq. Washington fears advances by Syrian troops and allied fighters could help Iran expand its influence across the region and establish a “Shiite corridor” of land links from Iraq to Lebanon, and all the way to Israel. Iran backs militias fighting alongside the Syrian military.

Diverting fighters from the battle for Raqqa, the U.S.-backed Syrian Democratic Forces made a bid for the province to secure territories there, focusing on securing the Iraq border, still mostly controlled by the Islamic State.