BEIRUT, Lebanon — The diplomatic situation had been looking bright for President Bashar al-Assad of Syria. With the help of Russia, he had consolidated his power, the rebels were on their heels and the United States had just declared that ousting him was not a priority.
So why would Mr. Assad risk it all, outraging the world by attacking civilians with what Turkey now says was the nerve agent sarin, killing scores of people, many of them children? Why would he inflict the deadliest chemical strike since the 2013 attacks outside Damascus? Those attacks came close to bringing American military retaliation then. And in a stunningly swift reversal, Tuesday’s attack drew a response from President Trump: dozens of cruise missiles launched at a Syrian air base.
One of the main defenses offered by Mr. Assad’s allies and supporters, in disputing that his forces carried out the strike on Tuesday, is that such an attack would be “a crazy move,” as one Iranian analyst, Mosib Na’imi, told the Russian state-run news site Sputnik. Yet, rather than an inexplicable act, analysts say, it is part of a carefully calculated strategy of escalating attacks against civilians.
For years, at least since it began shelling neighborhoods with artillery in 2012, then bombing them from helicopters and later from jets, the Syrian government has adopted a policy of seeking total victory by making life as miserable as possible for anyone living in areas outside its control.
Government forces have been herding defeated opponents from across the country into Idlib Province, where the chemical attack occurred. Starved and bombed out of their enclaves, they are bused under lopsided surrender deals to the province, where Qaeda-linked groups maintain a presence the Syrian military uses as an excuse to bomb without regard for the safety of civilians.
Dr. Monzer Khalil, Idlib Province’s health director, said such extreme tactics aimed to demonstrate the government’s impunity and to demoralize its foes.
“It makes us feel that we are defeated,” said Dr. Khalil, whose gums bled after he was exposed to scores of chemical victims on Tuesday. “The international community will stay gazing at what’s happening — and observing the explosive barrels falling and rockets bombing the civilians and the hospitals and the civil defense and killing children and medical staff — without doing anything.”
“Militarily, there is no need,” said Bente Scheller, the Middle East director of the Berlin-based Heinrich Böll Foundation. “But it spreads the message: You are at our mercy. Don’t ask for international law. You see, it doesn’t protect even a child.”
On Thursday, Syria’s foreign minister challenged accounts by witnesses, experts and world leaders that his government was involved. “I stress to you once again: The Syrian Army has not, did not and will not use this kind of weapons — not just against our own people, but even against the terrorists that attack our civilians with their mortar rounds,” the minister, Walid al-Moallem, said in Damascus.
But the denial, as well as a Russian assertion that a bomb hit a chemical weapons depot controlled by the rebels, seemed perfunctory, almost without regard to the facts, which Western governments said pointed to a Syrian government hand.
Critics of President Barack Obama, including President Trump, say that his decision not to enforce his “red line” on chemical attacks in 2013 convinced the Assad government it could get away with anything, and that it has been escalating its harsh tactics against civilians ever since.
Since that “green light,” wrote Jihad Yazigi, an opposition-leaning Syrian economist, “Assad knows that a large-scale attack against its civilians is a short-term public relations liability but a long-term political asset.”
That was only reinforced, critics say, by recent statements by American officials that it was time to accept the “political reality” of Mr. Assad’s grip on power.
By showing it puts no limits on the tactics it uses, Mr. Yazigi wrote, “the regime shows to the world the West’s impotence and weakness.”
Dr. Khalil, 35, fled his job at a state-run hospital in 2011. The Syrian uprising was in its early days, with largely peaceful protests that faced crackdowns from security forces. He said he was threatened with arrest for treating wounded protesters.
In 2015, a mix of Qaeda-linked and other rebels, some supported by the United States and its allies, drove government forces from Idlib, the capital of Idlib Province. Dr. Khalil became the health director. The city then became a bombing target, and the Syrian government accused the Americans of backing the Qaeda-linked group, then called the Nusra Front.
“We are aware that we are in this Qaeda trap,” Dr. Khalil said. “But in Idlib we have 3.3 million people, and how many Qaeda fighters? You cannot kill the three million for their sake.”
The fall of Idlib led to another turning point: Russia’s full-on entry into the conflict, adding its firepower to the Syrian government’s. Russia said it entered to fight the Islamic State, but directed most of its strikes at places farther west, like Idlib, where rival insurgents more urgently threatened government forces.
Chlorine attacks continued — investigators from the Organization for the Prohibition of Chemical Weapons and the United Nations concluded the government had carried out at least three in 2014 and 2015 — with little international reaction.
Idlib’s population grew as rebels and civilians moved there from areas recaptured by Assad forces and allies.
After Mr. Trump came into office, proclaiming a wish to work with Russia and maybe even Mr. Assad against the Islamic State, expectations grew that the international community would accept relegitimizing Mr. Assad. And last week came the statements from Secretary of State Rex W. Tillerson and the ambassador to the United Nations, Nikki R. Haley, indicating effectively that Washington could accept Mr. Assad remaining in power.
On Monday, Western officials were gathering in Brussels to weigh billions of dollars in reconstruction aid to the Assad government, amid opposition fears that they would drop their demand for a political transition first.
By Thursday, however, American military officials were discussing a possible military strike on Syria, and Mr. Tillerson was saying there was “no role” for Mr. Assad in Syria’s future. And then Thursday — before dawn on Friday in Syria — Mr. Trump ordered the attack on the Shayrat air base, from which, he said, the chemical attack was launched.
Witnesses described how Tuesday’s attack unfolded. That morning, a network of observers was, as usual, tracking the skies to warn residents and rescuers of possible airstrikes. They spotted Syrian aircraft and sent out warnings on walkie-talkies.
Syrian Su-22 aircraft were then seen circling above Khan Sheikhoun at 6:47 a.m. and again at 6:51 a.m. One of the observers — based on long experience — believed that the planes might be carrying a chemical payload.
“Guys, tell people to wear masks,” he warned.
Witnesses put the attack itself at just before 7 a.m. A video of the area at that time shows three towering puffs of smoke and one smaller cloud.
Dr. Khalil said he and his wife were drinking coffee at home at 8 a.m. when he got a call and rushed to Idlib’s central hospital. He found 60 patients already packing the wards. His nose began to itch, from the toxic substances, he believes. Back in Khan Sheikhoun, new airstrikes hit a hospital and a civil defense headquarters.
Across the province, doctors were noticing symptoms similar to those from sarin. Some of the displaced people who wound up in Idlib in recent years come the Damascus suburbs that were attacked with sarin in 2013.
One, a media activist from near Damascus, Moaz al-Shami, was sickened for two months by the 2013 attacks. Now living in Idlib, he was struck with the same vomiting and respiratory distress he remembered from that day.
His voice remained hoarse on the telephone two days later.
Reporting was contributed by Patrick Kingsley from Reyhanli, Turkey; Karam Shoumali and Safak Timur from Istanbul; and Hwaida Saad from Beirut.