Antigovernment rebels captured most of Syria’s largest city, Aleppo, by early Saturday, facing little resistance from government forces on the ground there, according to the fighters and to a war monitoring group.

Syrian government warplanes responded with airstrikes on Aleppo neighborhoods for the first time since 2016, according to the war monitoring group, the Syrian Observatory for Human Rights.

The Russian Defense Ministry said on Friday that Russia had carried out airstrikes against the rebel offensive in support of the Syrian military, but it did not say where. The observatory said that the Russian strikes had hit opposition-held areas of two provinces, Aleppo and Idlib. It was not immediately clear whether Russia had struck the city of Aleppo, capital of the Aleppo province.

The rapid advance on Aleppo came just four days into a surprise rebel offensive launched on Wednesday. It is both the most serious challenge to Mr. al-Assad’s regime and the most intense escalation in years in a long civil war that had been mostly dormant.

Aleppo was the site of a fierce and bloody battle for control over the city in 2016, a fight that dragged on for months. The rebels were ultimately routed in a big blow to their efforts to oust the autocratic president, Bashar al-Assad.

The Aleppo governor, police and security commanders, and other regime forces have fled the Aleppo city center, the observatory said on Saturday.

Some former residents of Aleppo have returned to the city with the advancing rebel offensive. They and the antigovernment fighters have been sharing photos and videos said to be of themselves in front of Aleppo landmarks. One image showed an ancient citadel that served as a military outpost for Mr. al-Assad’s forces at the height of battles for the city years ago.

Residents of Aleppo described to The New York Times how control of their city seemingly switched between night and day.

Syrian state media challenged the reports of a rebel takeover of most of Aleppo, saying that the military had captured groups of “terrorists” who had been filming inside several neighborhoods to try to prove they had taken control of them. Since the early days of the uprising, the government has characterized virtually all opposition figures as terrorists.

Muhammad Haj Kadour contributed reporting.