Phil Weiser, the Democratic attorney general of Colorado, won an upset victory in the state’s primary election for governor on Tuesday, according to The Associated Press, defeating a sitting United States senator who had far more money and establishment support.
A year ago, Mr. Weiser was trailing his Democratic rival, Senator Michael Bennet, by as many as 30 percentage points. But he prevailed by running a dogged upstart campaign, arguing that Colorado’s next governor needed to be a fighter who would take on President Trump and defend the Democratic-controlled mountain state from a barrage of administration attacks.
As attorney general, Mr. Weiser filed more than 66 lawsuits against the Trump administration. The suits challenged funding cuts aimed at Colorado, the decision to relocate the U.S. Space Command headquarters from Colorado to Alabama and President Trump’s immigration crackdown and tariffs.
Mr. Weiser is heavily favored to win Colorado’s November general election. The state has not elected a Republican governor in more than 20 years, and Mr. Trump is deeply unpopular with independent voters across Colorado.
The race for the Republican Party nominee had not yet been called on Tuesday night. Barbara Kirkmeyer, a state lawmaker supported by many mainstream Republicans, was in a tight race with Victor Marx, a far-right pastor who has drawn scrutiny for claims about his ministry and his life story, including that at age 7 he was forced to kill a man.
Despite years of Democratic control in Colorado, Mr. Weiser and Mr. Bennet both argued that the state needed a new direction. Both men acknowledged that the soaring costs of housing and health care were driving families and businesses away, and they promised to reduce regulations to jump-start home building and revive the state’s economy.
Many voters had to squint to see much difference between the two men’s plans. Some liked Mr. Bennet’s call for a state-run health care system or cap on polluting emissions. Others said Mr. Weiser would be a better advocate for teachers and public schools.
“They look alike on a lot of things,” said Danielle Varda, a former school board member in the Denver suburb of Jefferson County who was running for the state legislature, and voted for Mr. Weiser.
But the race got nasty as it tightened over the last few months. Donations poured in from super PACs and out-of-state donors — including Michael R. Bloomberg, a billionaire and former mayor of New York City, who supported Mr. Bennet.
The men put out a barrage of campaign ads attacking each other — and then attacking those attacks.
Although Mr. Weiser has served two terms as attorney general and was the dean of the University of Colorado’s law school before that, he managed to cast himself as the underfunded outsider in a race against Mr. Bennet, who has spent 17 years in the Senate.

