The morning after Donald Trump was sworn in on the Capitol steps, Massachusetts Attorney General Maura Healey looked out over a massive crowd of her own. Some 175,000 demonstrators had gathered on the Boston Common to protest the new president, and Healey—flanked by Massachusetts senators Elizabeth Warren and Ed Markey—was prepared to stir their fervor. She vowed to fight the administration on topics ranging from women’s issues to corporate interests, and declared an unequivocal warning to the famously litigious new president. “The message from the people of Massachusetts is: We’ll see you in court,” Healey said.

The Democratic prosecutor got the fight she was looking for faster than she could have possibly fathomed. On January 31, Healey joined attorneys general from three other states to sue the U.S. government after the Trump administration closed America’s borders to refugees and non-U.S. citizens from seven predominantly Muslim countries. The suit, of course, followed days of chaos, as airports around the country descended into disarray. In a matter of hours, hundreds of people, including green-card holders, had been detained, pulled off flights, or separated from their families. The Department of Homeland Security, which was only marginally involved in the drafting and rollout of the plan, scrambled to figure out what the changes meant. Thousands of protesters stormed J.F.K., LAX, Dulles, and other international airports as a small army of lawyers were deployed to arrival terminals to offer pro-bono legal advice to immigrants and families ensnared in Trump’s dragnet.

As Boston’s Logan International Airport became a flash point of the country’s latest culture war, Healey’s office was among the first to get involved. Two days after Trump signed the order, she issued, on a Sunday, a joint statement with 16 other attorneys general condemning the White House directive. Two days later, she joined a federal lawsuit filed by the American Civil Liberties Union, which challenged the E.O. on the grounds that it was a religious test. “The president’s executive order is a threat to our Constitution. Rather than protecting our national security, it stigmatizes those who would lawfully emigrate to our state,” Healey said in in a statement. “The [Trump] administration has embarrassed and endangered our country. On behalf of the Commonwealth, my office is filing intervention papers to challenge the immigration ban and hold this administration accountable for its un-American, discriminatory, and reckless decision-making.”

Healey didn’t mince words when I asked her how she sees her job amid the new reality of the Trump administration. “We need to stand up for the rule of the law,” she said. “And if the administration attempts to carry out unconstitutional campaign promises, we need to be there to take that on.” Indeed, attorneys general are often among the first line of defense against abuses by the federal government, and Healey indicated that if the new administration took steps to curtail environmental or financial regulations, anti-trust and labor laws, or moves forward with a number of the controversial—and in some cases, unconstitutional—policies that Trump pitched on the campaign trail, her office would be prepared to hit President Trump with a fusillade of legal attacks.

Less than a month into office, Healey’s warning is already being tested. The Democratic Party has been rendered largely inert and anemic after a string of disappointing midterm and general elections during the Obama era. In the wake of Trump’s surprising victory, it has appeared somewhat rudderless as it grapples with its own internal Tea Party moment while endeavoring to thwart Republican momentum on Capitol Hill. Into this vacuum, the courts have emerged as ground zero for the Trump resistance—as demonstrated by Thursday’s Ninth Circuit U.S. Court of Appeals ruling. Borne of necessity, attorneys general like Healey and judges like James Robart have emerged as, arguably, the most effective adversaries of Trumpism.