Syrian government troops on Friday recaptured all points taken by rebels in a surprise offensive launched late last week in the east of the capital Damascus, state media said.
"The army has retaken all the areas infiltrated by the terrorists in the area between the Jobar and Qabun neighbourhoods... after intensive military operations," the official SANA news agency reported.
State television showed a reporter greeting cheering soldiers near Abbasid Square, which had been emptied of its usual traffic at the beginning of the rebel assault on Sunday.
Footage showed burned out cars in the streets and a building with a hole blasted through its side.
The surprise attack, which sparked heavy fighting and shelling, was launched from the Jobar neighbourhood, where control is divided between rebels and government forces.
The assault was intended to assist allied rebel fighters in the nearby districts of Barzeh, Tishreen and Qabun, as they came under government attack, the Syrian Observatory for Human Rights monitor said.
The assault involved rebels including the Islamist Faylaq al-Rahman group, as well as the jihadist Fateh al-Sham Front, known as Al-Nusra Front before it renounced ties with Al-Qaeda.
Jobar in the east of Damascus has been a battleground for more than two years, with government forces seeking to push rebels out because of the neighbourhood's proximity to the heart of the capital.
During the fighting, rebels briefly penetrated the central Abbasid Square area, and schools were closed because of the fighting, as residents cowered at home.
More than 320,000 people have been killed since Syria's war began with anti-government protest in March 2011, but the capital has been insulated from much of the worst violence.