A video image provided by the Syrian Civil Defense [“White Helmets”], an aid group, of toddlers after a suspected chemical attack in the rebel-held Syrian suburb of Douma on Sunday. CreditSyrian Civil Defense White Helmets, via Associated Press

BEIRUT, Lebanon — Dozens of Syrians choked to death after a suspected chemical attack struck the rebel-held suburb of Douma, east of Damascus, with aid groups on Sunday blaming President Bashar al-Assad’s government for the assault and Western governments expressing outrage

Rescue workers in Syria reported finding at least 42 people dead in their homes from apparent suffocation, and antigovernment activists circulated videos of lifeless men, women and children sprawled out on floors and in stairwells, many with white foam coming from their mouths and nostrils.

A stream of patients with burning eyes and breathing problems were rushed to clinics after the attack at dusk on Saturday, medical and rescue groups said.

The attack appeared to break the will of Douma’s rebels, who agreed on Sunday to a deal with the government to hand the area over and be bused to another area outside government control in the country’s north. Thousands of fighters and tens of thousands of their relatives are expected to leave soon.

The latest atrocity in Syria’s agonizing seven-year civil war drew immediate condemnation from the United States and the European Union, but Mr. Assad’s allies in Moscow and Tehran dismissed allegations of a chemical attack as “bogus.”

The British Foreign Office called for an urgent investigation and said that if the use of chemical weapons proved to be true, “it is further proof of Assad’s brutality.”

The United States government said it was working to verify whether chemical weapons had been used. A new, confirmed chemical attack in Syria would pose a dilemma for President Trump, who ordered military strikes on a Syrian air base after a chemical attack last year to punish Mr. Assad but has more recently said he wanted to get the United States out of Syria.

In posts on Twitter on Sunday, Mr. Trump condemned the attack, blaming Iran and President Vladimir V. Putin of Russia for supporting the Syrian government and warning of consequences. White House officials did not rule out a military response.

Mr. Trump also took a jab at former President Barack Obama, who declined to respond militarily to evidence that the Syrian government had gassed its own people in 2013.

“If President Obama had crossed his stated Red Line In The Sand, the Syrian disaster would have ended long ago! Animal Assad would have been history!” Mr. Trump tweeted.

(Burning eyes, foaming mouths: Here is a look at the major episodes of suspected chemical attacks in Syria in recent years.)

State news media in Syria denied that government forces had used chemical weapons and accused the Islamist rebel group that controls Douma, the Army of Islam, of fabricating the videos to solicit international support as defeat loomed.

The Russian Foreign and Defense Ministries also denied that chemical weapons had been used.

It was not possible to independently verify the reports because Douma is surrounded by Syrian government forces, which prevent access by journalists, aid workers and investigators.

The attack occurred near the end of a monthslong push by the Syrian government to retake a group of towns east of Damascus known as Eastern Ghouta. The towns have been held by rebels seeking to topple Mr. Assad since the early years of the Syrian war, and the rebels have often shelled Damascus, killing civilians.

The Syrian government and its allies — the Russian military and militias backed by Iran — have surrounded and bombarded the area, killing more than 1,600 people and forcing tens of thousands to flee, according to the Syrian Observatory for Human Rights, which monitors the conflict from Britain through contacts in Syria.

Douma is the last remaining town in the area still controlled by rebels, and the Syrian government has vowed to retake it.

A picture said to show victims of the attack in a building in Douma. CreditSyrian Civil Defense White Helmets, via Associated Press

A day earlier, after the government began a new offensive against the area, Hussein Mortada, a Lebanese reporter who supports the Syrian government, released a video of himself on a hill near Douma as columns of smoke from government attacks rose in the background.

“These are appetizers,” he said. “The story is bigger than a ground invasion. There is something they will see today if the story continues. They will feel something very strong.”

The intensity of the shelling and airstrikes caused many residents to seek safety in basements, which could have made them more vulnerable to poisonous gases.

On Saturday afternoon, 15 people, including women and children, reported breathing problems after an airstrike in their area, Mahmoud Aadam, a spokesman for the Syrian Civil Defense, the so-called White Helmets, who rescue people in the wake of airstrikes, said via Facebook Live on Sunday.

Then, after dark, a government helicopter dropped exploding barrels that dispersed an unknown chemical substance that affected many more people, Mr. Aadam said. The continued assaults made it hard for rescue workers to look for victims, he said, meaning that it was difficult to establish a comprehensive death toll.

As of Sunday morning, rescue workers were “going into homes and finding people dead,” he said.

In a joint statement, the Syrian Civil Defense and the Syrian American Medical Society, which supports clinics in opposition areas of Syria, said that more than 500 people had gone to medical centers after the assault “with symptoms indicative of exposure to a chemical agent.” Those symptoms included trouble breathing, foaming at the mouth, burning eyes and the “emission of a chlorine-like odor.”

One person was dead on arrival at a clinic, six others died after they got there, and rescue workers reported finding more than 42 dead in their homes, the statement said. The bodies could not be evacuated because of strong odors and a lack of protective equipment.

“The reported symptoms indicate that the victims suffocated from the exposure to toxic chemicals,” the statement said.

The Syrian Observatory for Human Rights, which did not confirm the use of chemical agents, said that 56 people, including women and children, had been killed in the past 24 hours, including 21 who suffocated in the basements of buildings that had collapsed on them. About 500 others were wounded in the bombardment, and 70 had breathing troubles, the group said.

“The Assad regime and its backers must be held accountable, and any further attacks prevented immediately,” a State Department spokeswoman, Heather Nauert, said in a statement. Ms. Nauert noted a sarin gas attack in April 2017 in northwestern Syria that the United States and the United Nations blamed on the Syrian government.

“The United States calls on Russia to end this unmitigated support immediately and work with the international community to prevent further, barbaric chemical weapons attacks,” Ms. Nauert said.

Foreign Minister Jean-Yves Le Drian of France on Sunday said reports of the chemical attack were extremely worrying and called for the United Nations Security Council to meet quickly to examine the situation.

The Russian Foreign Ministry dismissed the reports as fake.

“The spread of bogus stories about the use of chlorine and other poisonous substances by government forces continues,” the ministry said in a statement. “The aim of such deceitful speculation, lacking any kind of grounding, is to shield terrorists,” it added, “and to attempt to justify possible external uses of force.”

Bahram Qasemi, the spokesman for Iran’s Foreign Ministry, said on Sunday that reports of the gas attack were not based on facts and were an “an excuse” by the United States and Western countries to take military action against Damascus, the official Iranian news agency IRNA reported.

Mr. Obama struggled with how to respond to such attacks in Syria. After declaring the use of chemical weapons a “red line,” he declined to respond militarily when a chemical attack by the Syrian government in 2013 killed more than 1,400 people near Damascus, according to a United States assessment.

Instead, the United States and Russia reached an agreement to have Syria surrender its chemical weapons stockpiles and dismantle its capabilities to make new ones.

The agreement was celebrated at the time, but multiple chemical attacks since then have been blamed on the Syrian government, raising questions about how effective the agreement was.

Correction: April 8, 2018 
An earlier version of this article misstated the surname of a State Department spokeswoman in two instances. She is Heather Nauert, not Nauret.