By winning the Democratic primary to be New York’s next attorney general, Tish James is now virtually guaranteed to become the state’s top legal officer this November. That position will almost immediately make her into a national figure—and perhaps the most influential state official in the country who isn’t a governor.

James, who currently serves as the public advocate of New York City, trounced three rivals to capture the Democratic nomination. The race saw strong challenges from her left flank by Zephyr Teachout, a Fordham University law professor known for her anti-corruption work, and Sean Patrick Mahoney, a sitting congressman. New York’s status as a Democratic stronghold means that the party’s primary is the de facto election to office, and her victory in November is all but certain.

It’s no slight against other states to note that James will wield slightly more power than the typical attorney general. Other big blue states are home to strong attorneys general, too: California’s Xavier Becerra, for example, is a leading figure in litigation against the Trump administration. (The state budget even set aside more money for him to fight the White House last year.) But it’s hard to compete with New York. After all, it’s easy to become a national figure when your jurisdiction includes the nation’s preeminent urban metropolis and the nerve centers of American media.

That’s become more true in the past decade, as attorneys general have become key players in national politics. Republican-led offices frequently banded together to challenge the Obama administration, from the Affordable Care Act to his executive order enacting the DACA program for children of undocumented immigrants. After Trump took office, it was the blue states’ turn. Democratic attorneys general have waged their own legal wars on the Trump administration’s travel ban, regulatory rollbacks, and family separations. Those fights have made the position into a politically lucrative one in an era where Democrats are powerless in Washington. Keith Ellison, who was a rising Democratic star in Congress, opted to run for the Minnesota attorney general’s office this year instead.

New York’s singular status gives James even more opportunities to make a national impact. The state is home to the bulk of America’s financial infrastructure, thereby giving its attorney general a unique set of responsibilities. Eliot Spitzer spent the bulk of his tenure using New York’s broad anti-fraud laws to investigate major Manhattan banks and corporations, a crusade that transformed the office into “the sheriff of Wall Street” and catapulted him to the state governorship. (He resigned two years later after a prostitution scandal.) Andrew Cuomo, the state’s current governor, succeeded Spitzer and followed a similar path, minus the prostitution scandal.

James will be expected to carry on the office’s modern role as a financial watchdog and an anti-corruption enforcer, though she disclaimed the “sheriff of Wall Street” moniker on the campaign trail. But the job’s most pressing responsibility today is keeping an eye on an even bigger fish. By sheer happenstance, President Donald Trump and his business empire fall under the jurisdiction of the New York attorney general’s office. This wouldn’t matter much under normal circumstances, but Trump is not a normal president.

In fact, two of James’s predecessors have already tangled with the president. In 2013, Eric Schneiderman began investigating Trump University, a now-defunct real-estate seminar program, for defrauding thousands of its customers. Lawsuits in other states depicted the seminars as a scheme preying on financially insecure people and offering them mundane real-estate advice for thousands of dollars. Trump settled the lawsuits, including Schneiderman’s, for $25 million after the election. Earlier this year, current New York Attorney General Barbara Underwood sued to shut down the Donald J. Trump Foundation for habitually violating state charity laws. James pledged to serve as an anti-corruption check on the president during her candidacy.

Policing Trump’s business empire may only be the beginning. The New York attorney general’s office has reportedly worked with special counsel Robert Mueller on his sprawling investigation into Russian electoral meddling, although the full extent of the offices’ cooperation is unknown. There’s widespread speculation that the New York attorney general could theoretically function as a dead man’s switch for the Russia investigation, continuing the case in some form even if the federal inquiry is shut down. Trump could theoretically fire Mueller, purge the rest of the Justice Department, and pardon his political allies at a moment’s notice. But he has no power over state-level investigations, and presidential pardons only apply to federal crimes.

As a result, James could find herself playing a pivotal role in American history should the worst come to pass. She made clear on the campaign trail that she’s eager for the fight. “The president of the United States has to worry about three things: Mueller, [Michael] Cohen, and Tish James,” she said in a recent interview. “We’re all closing in on him.”