Democratic attorneys general have spearheaded state resistance to President Trump’s policies, but some face tight election races on Nov. 3. While Democrats expect gains elsewhere, these contests often hinge on local crime concerns. Adam Piper said, "Current alarms are not smoke detectors beeping from burnt popcorn, but indicators of fires."

Democratic attorneys general have spearheaded state resistance to President Trump's policies. But some face tight election races despite polls showing broad voter support for Democrats.

Democratic attorneys general have operated for two years as the tip of the spear in their party's confrontations with President Trump, suing him 100 times on issues ranging from the deployment of National Guard troops to tariffs and the withholding of federal funds.

But a week before Election Day, it remains unclear whether midterm voters will fortify that front by electing Democratic attorneys general in Kansas and Iowa, or take down two of its members, Keith Ellison of Minnesota and Kris Mayes of Arizona.

In a midterm cycle where Democrats appear poised to make significant gains in Congress, governorships and statehouses, the races for attorney general are murkier. Often they hinge on localized concerns like crime and public safety that can favor Republicans. Sometimes they can also be caught up in a nationalized political environment.

For Republicans, national worries loom large in states such as Iowa and Georgia. Adam Piper, executive director of the Republican Attorneys General Association, warned in a memo last month, "Current alarms are not smoke detectors beeping from burnt popcorn, but indicators of fires in states that Republicans have taken for granted for decades."

The biggest G.O.P. worry is in Kansas, where the incumbent attorney general, Kris Kobach, a longtime conservative fixture and sometime lightning rod, faces a rematch against Chris Mann, a former police officer and prosecutor. Mr. Kobach has cautioned that his race could be affected by the U.S. Senate contest, in which Democrats have been energized by Adam Hamilton, a megachurch pastor, against the incumbent, Senator Roger Marshall.

For Democrats, the headache is in Minnesota, where the attorney general, Keith Ellison, is fighting for his political life. At a rally this month in Rochester, Minn., Zack Filipovich, the Democratic candidate for state auditor, pleaded Mr. Ellison's case for him.

Subscribe to The Times to read as many articles as you like.