“Americans severely misjudged the authoritarians,” Umair Haque, a consultant and social-media maven, commented on Twitter on Saturday night. "But the authoritarians, it seems, also severely misjudged Americans.'' Yes, they did, and this weekend’s events offered a bit of hope to everybody alarmed by Donald Trump. Saving America from the most unhinged and least qualified figure ever to occupy the Oval Office may well require a long and bitter fight. But a couple of early markers have been put down. The new President is not beyond the law. And many Americans will not stand by quietly as he traduces their country's values, threatens its democracy, and destroys its reputation around the world.

Clearly intent on giving the impression that he is a man of action, Trump spent his first week on the job issuing a stream of Presidential edicts: reining in regulations, approving oil pipelines, undermining the Affordable Care Act, freezing federal hiring, and pledging not to sign any more multilateral treaties. Every day seemed to bring a new display of chauvinism. But it was his executive order suspending entry to the United States for refugees and people from seven predominantly Muslim countries that provoked, for the second weekend in a row, a huge demonstration of opposition to his Presidency and all it stands for.

As news broke of U.S. border agents detaining people—refugees who had worked for the U.S. military in Iraq; Ivy League academics returning to their jobs; other blameless individuals—thousands of people headed out to major airports. Most were going to protest. Others, including immigration lawyers and public defenders, were going to offer their professional services. (My colleague Nathan Heller reported on the scene at J.F.K., in New York City.)

As the number of demonstrators mounted, they received some encouraging news from the Federal District Court in Brooklyn. At about nine on Saturday night, in response to a lawsuit filed by the American Civil Liberties Union, Judge Ann M. Donnelly issued an emergency stay on part of the new policy, ordering that the U.S. government couldn't deport people who had arrived with valid visas or refugee status. Minutes later, at the Federal District Court in Virginia, a second judge issued an order preventing the government from deporting any green-card holders who had been detained at Dulles, and ordering border agents to give immigration lawyers access to them.

On Sunday, the demonstrations expanded to other cities and got larger. At New York’s Battery Park and in Boston's Copley Square, tens of thousands gathered to protest against what they regarded as a ban on Muslims. By then, some of Trump's lackeys had given weaselly statements in the press suggesting that some sort of modification was in the works. On Sunday evening, the Department of Homeland Security announced that "absent . . . information indicating a serious threat" legal residents of the United States—i.e., holders of green cards—would be exempted from the bans.

In the scheme of things, it was a small reversal. The indefinite ban on refugees from Syria was still in place, as were the hundred-and-twenty-day ban on refugees from other countries and the ninety-day ban on visitors from Iran, Iraq, Libya, Somalia, Sudan, Syria, and Yemen. All three bans are senseless and arbitrary, and the two that apply to Muslim countries are clearly discriminatory (despite Trump's claim, in a statement on Sunday, that “this is not about religion—this is about terror and keeping our country safe”).

For all the awfulness, however, it is worth pausing to consider what has happened. Autocrats subvert democracies by undermining the institutions that sustain them: legislatures; representative local governments; the judiciary; the media and other nongovernmental organizations, such as civil-rights groups; and, of course, an active citizenry. With the Senate and House of Representatives under the control of a Republican Party that has made a Faustian pact with Trump, it was never likely that they would rein him in. In this instance, though, the other institutions of civil society fulfilled their roles.

Civil-rights lawyers sued to block parts of the new policy, and judges ruled against the government. Ordinary citizens demonstrated—to themselves, and to people around the world—that Trump and his bigotry don't represent the United States. Local and national politicians, such as New York City Mayor Bill de Blasio and Senators Chuck Schumer, Kirsten Gillibrand, and Elizabeth Warren, turned out alongside them. (It wasn't just a coastal protest. The mayor of Dallas, Mike Rawlings, issued an apology to people who had been detained at Dallas–Fort Worth International Airport.) On Monday, Barack Obama issued his first statement since leaving office, offering support for the protests and, through a spokesman, saying that “American values are at stake.” The media reported what was happening, prompting Trump to go on another online tirade, in which he suggested that someone should buy the Times and "run it properly" or close it down.

There were a couple of other encouraging developments. On Sunday, after maintaining a pitiful silence for more than a day, some Republicans distanced themselves from Trump's policy. Senators John McCain and Lindsey Graham said the order "may do more to help terrorist recruitment than improve our security.” Of course, McCain and Graham have both criticized Trump in the past. But on this occasion they were joined, for once, by other Republican senators, such as Cory Gardner, of Colorado, who said the Trump order went "too far," and Lamar Alexander, of Tennessee, who said it came close to being a religious test, which is "inconsistent with our American character."

For the first time since Trump’s election, prominent business leaders also distanced themselves from him. "We have many employees from the named countries, and we do business all over the region," Jeffrey Immelt, the chief executive of General Electric, said in a memo to the firm's employees. "These employees and customers are critical to our success and they are our friends and our partners. We stand with them." Tim Cook, of Apple, which was founded by the son of a Syrian immigrant, told his employees that the firm “would not exist without immigration, let alone thrive and innovate the way we do." Starbucks announced plans to hire ten thousand refugees in seventy-five countries around the world. In an open letter, Howard Schultz, the coffee-shop chain's C.E.O., said, "We will neither stand by, nor stand silent, as the uncertainty around the new Administration’s actions grows with each passing day."

Sergey Brin, the co-founder of Google, who emigrated to the United States from Russia at the age of five, attended a protest at San Francisco International Airport on Saturday. "I am here because I am a refugee," he told a reporter from Forbes. And on Monday, Lloyd Blankfein, the chief executive of Goldman Sachs, a number of whose former employees hold senior positions in the Trump Administration, said in an internal memo that was leaked, “This is not a policy we support.”

It is far too early to say that corporate America is abandoning Trump and refusing to work with his Administration. But business leaders are indicating that there are limits to what they will go along with. U.S. multinational companies are closely integrated into the global economy. In many cases, they rely on overseas countries for markets, labor, and capital. Trump's effort to turn the United States into a fearful, inward-looking, discriminatory, and isolationist country is potentially disastrous for them. As Immelt put it, "There would be no GE without our smart, dedicated employees from all over the world. . . . We are a very global team, and we will stand together as the global political situation continues to evolve."

Again, this is only a first step in resisting Trump, and nobody should underestimate the challenge ahead. We are dealing with a dangerous singularity—a President who openly acknowledges that he is at war with the press, who endorses torture, who accuses senators who dare to criticize his policies of "looking to start World War III,” and who is surrounded by courtiers and advisers who think the United States and other Judeo-Christian countries are engaged in a fight to the death with Islam.

There is no telling how the struggle to rein in Trump, and save America’s conception of itself, will play out, or how dark things might get. But the true patriots have raised their colors, and they won't be lowered without a mighty struggle.