Ohio. Wisconsin. Florida. You might be watching these swing states to see how the congressional or gubernatorial races will turn out, but they’re also hosting competitive state attorney-general contests. These races don’t usually attract much national attention, but this year, Democrats are hoping to rack up attorney-general seats, which Democrats have used to fight back against President Trump’s policy agenda.

Over the past year and a half, Democratic attorneys general have sued Trump and his administration over a variety of his administration’s decisions, including those on immigration, the environment and birth control. Now, Democratic candidates are making the case to voters that their down-ballot campaigns could be the key to holding Trump accountable. “The unfortunate reality is that we have a federal government that is acting lawlessly,” said Phil Weiser, a Democrat who is running for Colorado’s open attorney-general seat. “I believe the state attorney general is uniquely situated to step in and protect people’s rights.”

Although Republicans currently control two-thirds of the country’s governors mansions, their dominance over state attorney-general offices is less complete. Republicans currently control 27 attorney-general offices, while Democrats control 22 (one is an independent). But that balance of power could shift if Democrats win even a handful of races. This means a “blue wave” of Democratic attorneys general is possible — and it could be one of the most important outcomes of the election.

Party control of governor and attorney general offices State Governor Attorney General Alabama Republican Republican† Alaska Independent Independent* Arizona Republican Republican Arkansas Republican Republican California Democratic Democratic† Colorado Democratic Republican Connecticut Democratic Democratic Delaware Democratic Democratic Florida Republican Republican Georgia Republican Republican† Hawaii Democratic Democratic* Idaho Republican Republican Illinois Republican Democratic Indiana Republican Republican Iowa Republican Democratic Kansas Republican Republican Kentucky Republican Democratic Louisiana Democratic Republican Maine Republican Democratic* Maryland Republican Democratic Massachusetts Republican Democratic Michigan Republican Republican Minnesota Democratic Democratic Mississippi Republican Democratic Missouri Republican Republican Montana Democratic Republican Nebraska Republican Republican Nevada Republican Republican New Hampshire Republican Republican* New Jersey Democratic Democratic* New Mexico Republican Democratic New York Democratic Democratic† North Carolina Democratic Democratic North Dakota Republican Republican Ohio Republican Republican Oklahoma Republican Republican† Oregon Democratic Democratic Pennsylvania Democratic Democratic Rhode Island Democratic Democratic South Carolina Republican Republican South Dakota Republican Republican Tennessee Republican Republican* Texas Republican Republican Utah Republican Republican Vermont Republican Democratic Virginia Democratic Democratic Washington Democratic Democratic West Virginia Republican Republican Wisconsin Republican Republican Wyoming Republican Republican* Show more rows * In seven states, the attorney general is not popularly elected. In Alaska, Hawaii, New Hampshire, New Jersey and Wyoming, it is appointed by the governor. In Maine, it is elected by the state legislature. In Tennessee, it is appointed by the state Supreme Court. †In Alabama, California, Georgia, New York and Oklahoma, the attorney general is normally popularly elected, but because of a mid-term vacancy, the current attorney general was appointed. Sources: National Association of Attorneys General, news reports

State attorneys general have proved increasingly willing to flex their political muscle, particularly by banding together to file multistate lawsuits, which have spiked in number in recent years, according to research by political scientist Paul Nolette, who teaches at Marquette University. These efforts have also grown increasingly partisan, according to Nolette. “It’s a high-profile way to frustrate implementation of federal policy, and it’s been quite effective,” Nolette said.

For example, throughout the Obama administration, Republican attorneys general fiercely attacked its policies and notched some wins on issues like immigration and climate change. And over the past year and a half, blue-state AGs have launched a slew of lawsuits against the Trump administration and, in the process, racked up some victories on environmental protection and student debt relief. But Republican attorneys general haven’t vanished into the background now that the GOP controls the White House; in February, Republicans in 20 states filed a lawsuit against the Affordable Care Act, arguing that the law, including key provisions like protections for people with pre-existing conditions, was unconstitutional, furthering the Trump administration’s effort to dismantle the law. (A coalition of 17 Democratic attorneys general sprang into action to defend the law; the case went before a judge in September, but a decision hasn’t yet been released.)

This year, some Republican attorney-general candidates say they want to tamp down the polarization. “We shouldn’t be jousting and taking a partisan stand on every issue,” said George Brauchler, the Republican running against Weiser in Colorado’s attorney-general race. But even if some Republicans really are regretting their colleagues’ aggressive tactics (Weiser, for his part, claims that Brauchler isn’t as moderate as he seems), it may be difficult to put the genie back in the bottle.

State attorneys general have become nationally more important in a time of political gridlock, said James Tierney, a former attorney general of Maine and a lecturer at Harvard Law School. Apart from their ability to sue the federal government directly, there are other ways for AGs to influence policy — whether they believe the problem is federal overreach or underreach. They can, for example, limit how much state and local law enforcement officers cooperate with federal immigration agencies or step in to sue companies when they believe the federal government isn’t doing enough to protect citizens.

While Republicans seem to have long understood the legal importance of possessing an attorney general’s chair, Democrats may only now be trying to catch up. Lizzie Ulmer, the communications director of the Democratic Attorneys General Association, told FiveThirtyEight that the organization went from a group of part-time consultants working out of a Denver office building in early 2016 to a fully staffed party committee in Washington, D.C., for this election cycle — similar to what the Democratic Congressional Campaign Committee is for House races, for example. So far this election cycle, the association has raised $14 million according to disclosure forms from the Internal Revenue Service. That’s well ahead of the $8 million it raised in the 2014 cycle — but it’s still far behind the $31 million that its Republican counterpart, the Republican Attorneys General Association, has raised so far this cycle.

Some political sources have told reporters that as much as $100 million could be spent on attorney-general races this year (which would be a huge increase from previous years). That money is being spent on the 30 attorney-general posts that are up for election this year — 18 held by Republicans and 12 by Democrats. To see which were most vulnerable, we looked at polls of the races, fundraising numbers and the two partisan AG associations’ lists of states they are targeting.

Here are the seven states where we think Democrats could realistically make gains:

But it’s not just Democrats who could make gains. Republicans have one big pickup opportunity, too: the open seat in Minnesota. With his strong following among progressive Democrats, U.S. Rep. Keith Ellison started the race as the favorite. However, in August, Ellison’s former romantic partner accused him of physically and emotionally abusing her. The race is now neck and neck. Republican Doug Wardlow has picked up steam by promising not to mix politics with his work as AG, but the longtime conservative activist has already thrown that claim into question.

Flipping any of these offices could result in even more litigation against the Trump administration. Newly minted attorneys general may find themselves adding their names to more lawsuits than filing new ones, though, given how aggressive the Democrats have already been. But this year’s elections will undoubtedly serve as a test of whether the Democrats’ strategy of attacking Trump through the courts can also help them win elections.

UPDATE (Oct. 22, 2018, 9:28 p.m.): This article has been updated to reflect the fact that RAGA’s spending numbers in Colorado were current as of Oct. 15.

CORRECTION (Oct. 22, 2018, 1 p.m.): A previous version of this story gave an incomplete description of the evolution that the Democratic Attorneys General Association has gone through since early 2016. Between then and 2018, the group went from being staffed by part-time consultants in Denver to a fully staffed party committee in Washington.