Colorado Gov. John Hickenlooper, right, pressed his Republican opponent, Bob Beauprez, on social issues such as contraception and abortion during a debate in Denver. (Brennan Linsley/Associated Press)

Four years ago, then-Denver Mayor John Hickenlooper skated easily to victory in the Colorado gubernatorial race, bringing the offbeat personality that had charmed his city to the highest office in the state.

Hickenlooper arrived in the governor’s office as a business-friendly, centrist Democrat, and his casual, relaxed style seemed an ideal fit with the ethic of his state. There was even talk about a possible run for president in 2016, if Hillary Rodham Clinton decided to forgo another shot at the White House.

Then came 2013 and a confluence of events that shifted the state leftward on guns, same-sex unions and legalized marijuana; opened up partisan warfare; and recast Hickenlooper in a less flattering light. Today he is in danger of losing to Republican Bob Beauprez, a former member of the House who lost his first race for governor in 2006 by a wide margin.

In a telephone interview between campaign appearances, Hickenlooper blamed his predicament in part on what he called a “national malaise” over stagnant wages and a recovery that has moved forward slowly. “I think it’s a difficult year for any incumbent in both parties,” he said. “There’s a lot of dissatisfaction. . . . I think, all things considered, we’re doing okay. I wish we were doing better.”

Nationwide, governors are struggling. Nearly 30 are seeking reelection this year, and the Cook Political Report lists nine, including Hickenlooper, in tossup races, with another rated a clear underdog. Election Day could bring the biggest number of incumbent losses since 1990, when six were defeated.

In this 2010 ad, Colorado Gov. John Hickenlooper (D) promises to never run negative campaign ads. Hickenlooper is currently vying against Rep. Bob Beauprez (R) for reelection. (hickforco via YouTube)

Colorado’s economy is on the upswing. The latest figures from the Labor Department show that the state’s unemployment rate has dropped to 4.7 percent. But in the campaign this fall, the economy has taken a back seat politically to questions about Hickenlooper’s priorities and leadership.

After the shooting rampage at a movie theater in Aurora, Colo., in the summer of 2012 and then the horrific killing of children at Sandy Hook Elementary School in Newtown, Conn., in December of that year, the Colorado legislature passed tough gun restrictions. The new laws sparked a backlash and a series of recall elections in which two state senators lost their jobs. A third resigned.

In the spring of 2013, backed by the Democratic legislature over Republican opposition, Hickenlooper signed a civil unions bill, although voters had banned same-sex marriage in a 2006 statewide ballot initiative. Hickenlooper also began to implement the 2012 ballot initiative that made Colorado the first state in the nation to allow sales of marijuana for recreational use (although he had personally opposed the measure).

There was more trouble for Hickenlooper, however, as the politician who took pride in getting along with people of all ideological stripes sought to make amends with people unhappy about the direction of the state. In a meeting with a group of Colorado sheriffs in the spring, the governor offered an apology for the new gun laws, saying he had not anticipated that the restrictions would be so consequential. He punctuated an exchange with one sheriff with a vulgarity that he later said was in jest.

In the interview, Hickenlooper said that he stands by all the changes enacted during his first term, but that opponents should have had more opportunity to state their views as the issues were being debated. “Their voice wasn’t heard sufficiently,” he said.

The governor’s image also suffered when he granted an indefinite reprieve to a convicted murderer, Nathan Dunlap, who is on death row. Rather than grant clemency or sign off on an execution, he chose a path that appeared to be punting the issue into the future, despite warnings that it would hurt him. He came off looking indecisive and lacking the confidence of his beliefs.

Beauprez has made what he called “failed leadership” the core argument of his campaign. “He ran as this pro-business, party-doesn’t-matter, independent thinker,” Beauprez said in an interview, referring to Hickenlooper. He added that “2013 put a lot of people over the edge. By wide consensus, it was the most anti-business legislative session in Colorado history.”

Visual analysis: Key Senate races

Beauprez sharply criticized the governor’s leadership style. “Collaboration, thinking it through and let’s talk about something is one thing,” he said, “but John’s taken it to the point of an inability or unwillingness — one or the other, and neither one is good — to make the tough decisions. I think that’s put people over the edge.”

Hickenlooper, in turn, has sought to portray his rival as outside the mainstream in Colorado, particularly on women’s issues and climate change. Beauprez supports a ban on abortion even in cases of rape or incest and has said he would seek to deny state funding to Planned Parenthood.

When the two met at a debate held by the Denver Post late last month, Hickenlooper pressed Beauprez on these issues, knowing that the votes of unaffiliated women are likely to decide the election. Beauprez said he supported contraception but labeled intrauterine devices as comparable to a drug that ends a pregnancy.

On environmental issues, Hickenlooper said he believes that humans have contributed significantly to climate change, while Beauprez said he does not. The governor supported legislation allowing illegal immigrants to have driver’s licenses; Beauprez said he would seek its repeal.

The Republican Governors Association has run ads attacking Hickenlooper as weak and indecisive on whether to grant clemency in the case of the convicted murderer, while the Democratic Governors Association has countered with ads aimed at shoring up support for Hickenlooper among women by targeting Beauprez’s positions on abortion and contraception.

Privately, Democrats express frustration with Hickenlooper for allowing the race to even become competitive. Some have expressed concerns that Hickenlooper was too focused on being liked and was therefore not willing to make decisions that might offend some people. Others say he has neither offered a clear defense of his accomplishments nor provided a clear vision for where he wants to take the state in a second term.

But there are signs that Hickenlooper has gotten all the messages. At a rally earlier in the week with other Democratic elected officials that featured Hillary Rodham Clinton, Hickenlooper offered a broad defense of his record. He cited the drop in the state’s unemployment rate, an improved ranking among states in job creation and the fact that Colorado has become an increasingly attractive state to many young college graduates.

Democrats say they think Hickenlooper has begun to turn the race in his direction, but Republicans remain cautiously upbeat about Beauprez’s chances. Recent public polls have shown the differences between the two candidates’ level of support to be within the polls’ margin of error.

Hickenlooper prides himself on not running negative ads in his campaigns (although he has not forcefully discouraged his allies from doing so). In his first campaign for governor, he appeared in one ad fully dressed, taking a shower, to emphasize his feelings about attack ads.

Hickenlooper acknowledged that Republican attacks have hurt him. “I lost seven to eight points,” he said. “We’re fighting our way back.” But he said he has no regrets about his no-negative-ads policy. “Being the one person out there committed to not running negative ads — voters respond to that,” he said. “That’s one reason I think we’re going to win.”