But ISIS 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 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 ISIS' 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-ISIS 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 the city centre, where IS fighters are holding tens of thousands of civilians.
Around 2,500 terrorists 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.
Thursday'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 terrorists 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.
60% of territory lost
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 percent of their revenue.
In January 2015, IS controlled about 90,800 square kilometres, but by June 2017 that number dropped to 36,200, said IHS Markit.
The biggest fall was in the first six months of 2017, when IS lost around 24,000 square kilometres of territory.
"The Islamic State's rise and fall has been characterised by rapid inflation, followed by steady decline," said Columb Strack, senior Middle East analyst at IHS Markit.
"Three years after the 'caliphate' was declared, it is evident that the group's governance project has failed," Strack said.
IHS Markit said IS's average monthly revenue had plummeted by 80 percent, from $81 million in the second quarter of 2015 to just $16 million in the second quarter of 2017.
The White House envoy to the coalition, Brett McGurk, visited one of the recaptured areas on Thursday, meeting with local officials in the northern Syrian town of Tabqa.
ISIS terrorists were ousted from Tabqa and an adjacent dam on May 10 during the SDF offensive around Raqa.
The visit came a day after McGurk met with members of the Raqa Civil Council, the body expected to run the northern city after ISIS' expected fall there.