US-backed forces cut off the last escape route for the Islamic State group from Raqa, trapping the besieged jihadists inside their de facto Syrian capital.
But IS fighters hit back with a counterattack that included several suicide bombings against the Syrian Democratic Forces, an alliance of Kurdish and Arab fighters trying to seize control of the city.
The SDF captured two villages on the southern bank of the Euphrates River that the jihadists had been passing through to withdraw from the city, the Syrian Observatory for Human Rights said.
"The SDF has been able to completely encircle Raqa," said Rami Abdel Rahman, head of the Britain-based monitoring group, which relies on a network of sources on the ground.
It was the latest setback for IS, also known as ISIS, which declared its "caliphate" straddling Syria and Iraq three years ago but has since lost most of the territory it once controlled.
It came too as Iraqi forces announced the recapture of an iconic mosque in IS's last major Iraqi bastion Mosul, prompting Iraqi Prime Minister Haider al-Abadi to declare "the end" of the "fake" jihadist state.
The SDF, backed by the US-led anti-IS coalition, broke into Raqa on June 6 after spending months chipping away at jihadist territory around the city.
Its fighters have since captured two eastern and two western districts of the city and are pushing towards its centre, where IS fighters are holding tens of thousands of civilians.
Around 2,500 jihadists are fighting in the city, according to British Major General Rupert Jones, a deputy commander for the US-led coalition.
The SDF had surrounded the jihadists from the north, east and west but they were still able to escape across the Euphrates, which forms the southern border of the city.
Yesterday's advance saw SDF fighters capture the villages of Kasrat Afnan and Kasab on the southern bank of the Euphrates, cutting off the route the jihadists were using to withdraw to territory IS controls in the Syrian desert and in Deir Ezzor province.
The SDF has "continued to advance eastward south of the Euphrates River, moving to completely encircle ISIS in Raqa," said Colonel Ryan Dillon, spokesman for the US-led coalition.
"The SDF now control all high-speed avenues of approach into Raqa from the south," he added.
But the jihadists appear determined to make a bloody last stand.
Several dozen jihadists disguised in SDF uniforms launched an attack from the city centre, which they still control, on two districts in the southeast of the city.
They carried out three suicide car bomb attacks, deployed drones armed with explosives, seized six SDF positions and killed several fighters, Abdel Rahman said.
"Even totally besieged, jihadists are able to carry out operations," he added.
The war in Syria, which has seen jihadists, moderate rebels and forces loyal to Syrian President Bashar al-Assad pitted against each other, has killed more than 320,000 people since the spring of 2011.
A recent fact-finding mission by the UN's chemical watchdog found that sarin was used as a chemical weapon in an April 4 attack in the Syrian town of Khan Sheikhun, which killed at least 87 people including many children.
The findings by the Organization for the Prohibition of Chemical Weapons (OPCW), documented in a report partially seen by AFP Thursday, will now be taken up by a joint UN-OPCW panel to determine whether Syrian government forces were behind the attack.(AFP)
IS overran Raqa in mid-2014 as part of the offensive that saw it seize control of large parts of Syria and Iraq.
The city became infamous as the scene of some of the group's worst atrocities, including public beheadings, and is thought to have been a hub for planning attacks overseas.
The United Nations estimates some 100,000 civilians remain in the city, with the jihadists accused of using them as human shields.
Marking the third anniversary of IS's declaration of a state on June 29, 2014, a leading analysis firm said the jihadists had since lost more than 60 percent of their territory and 80 per cent of their revenue.