A decade ago, it was rare for a mayor to run for governor -- and even when they did, they weren't especially successful.

Today, mayors continue to face obstacles when running for governor, ranging from skepticism from rural voters to rivalries between big cities. But a mayor seeking the governorship -- and winning -- is not as rare as it once was.

In 2018, a strikingly large number of current or former mayors have launched campaigns for governor: close to 20, from cities big and small.

In California, for instance, the primary included not one but two former mayors. Gavin Newsom of San Francisco beat former Los Angeles Mayor Antonio Villaraigosa and is now expected to win in November.

Other former mayors making prominent gubernatorial bids this year include Mark Begich of Anchorage, Alaska, Karl Dean of Nashville and Mick Cornett of Oklahoma City.

So why are more mayors running now than they did a decade ago? Before we seek to answer that, let's take a look at why mayors have been reluctant to seek the governorship historically.

Mayors' Historical Disadvantages

In some ways, it's counterintuitive that so few mayors have been successful in seeking the governorship. Being a mayor should be ideal training for the job: It's an executive position that involves law enforcement, education, infrastructure and business development, and serving as a mayor often guarantees statewide media coverage.

Those advantages, however, didn't help Los Angeles Mayor Tom Bradley, who lost twice to Republican George Deukmejian. As Mark Barbarak of the Los Angeles Times recently noted, Los Angeles mayors have experienced "100 years of futility" in seeking the governorship.

In New York, Ed Koch was the only 20th-century mayor of the Big Apple to have pulled the trigger on a gubernatorial run, and he ended up losing in the primary to Mario Cuomo.

No Boston mayor has become Massachusetts governor since the notoriously corrupt James Michael Curley in the 1930s. Only one Illinois governor was a former Chicago mayor. And since Michigan became a state in 1837, only two Detroit mayors have made the leap to governor.

That's because the challenges mayors face as gubernatorial candidates are sizable.

A big one concerns policy. Favoring gun control, for instance, is popular in cities, but it becomes a major liability when trying to woo rural voters.

What's more, candidates running against mayors can use crime, poverty and other urban ills as a rhetorical weapon.

Then there's the urban-rural divide. Within states, resentments against big cities often flourish. Sometimes these tensions have to do with ideological differences or the distribution of public works resources within different parts of the state. Sometimes, though, they reflect deeply ingrained regional biases. "Mayors often run in states in which the suburban and rural populations hate the evil big city or at least distrust the political machines that tend to run them," says Dick Simpson, a political scientist at the University of Illinois at Chicago and a former Chicago alderman.

And being able to connect with urban voters doesn't necessarily translate into connecting with voters outside the city center.

Thomas J. Volgy, a former mayor of Tucson who now teaches political science at the University of Arizona, recalls friction when he tried to campaign for Congress in Yuma, a three- to four-hour drive from his home base. "One of the first things I was constantly reminded about was that Yumans hated big cities and all that came with it," he says.

Such obstacles have made many mayors uninterested in moving up the political ladder, according to data compiled by political scientists Katherine Levine Einstein, David Glick, Maxwell Palmer and Robert Pressel. Using data from 1992 to 2015, the researchers found that only 15 percent of mayors in cities with greater than 150,000 residents have run for higher office, and only 5 percent ultimately won. Female mayors ran at even lower rates.

What May Be Changing

"Most cities are in much better positions economically than they were a generation ago," says Eric Heberlig, a University of North Carolina at Charlotte political scientist. "Until the last year or so, crime also has decreased substantially. Having a record of increasing economic growth and decreasing crime is a powerful message of accomplishment that you can take to voters statewide."

There is some numerical evidence for this. According to data collected by Heberlig and his colleagues Suzanne Leland and David Swindell, the number of mayors running for governor doubled in the immediate period after the Great Recession -- 2009 to 2012 -- compared to any other four-year cycle going back to the early 1990s.

"After the Great Recession, many mayors can claim that they have led comeback efforts," says Marcia Godwin, a professor of public administration at the University of La Verne in California. "As long as the economy continues to grow and downtown redevelopment is successful, those claims will be compelling."

Some of the mayors who successfully ran for governor in recent years include Democrats John Hickenlooper in Colorado and Dannel Malloy in Connecticut, and Republicans Sarah Palin in Alaska, Bill Haslam in Tennessee, Paul LePage in Maine and Pat McCrory in North Carolina. Other prominent mayors who ran for governor but lost during that period were Houston Democrat Bill White and Milwaukee Democrat Tom Barrett.

In 2018, the list of upwardly mobile mayors has expanded.

Mayors or former mayors who are still running for governor at this writing -- including the aforementioned Begich, Cornett, Dean and Newsom -- are Democrats Walt Maddox in Alabama (Tuscaloosa); Andrew Gillum and Philip Levine in Florida (Tallahassee and Miami Beach, respectively); Carl Brewer in Kansas (Wichita); Steve Marchand in New Hampshire (Portsmouth); and Paul Soglin in Wisconsin (Madison). Democrat Stephanie Miner, a former Syracuse mayor, is running as an independent in New York.

Meanwhile, the Republicans running this year include Mark Boughton in Connecticut (Danbury) and Allan Fung in Rhode Island (Cranston).

A half-dozen other mayors -- a mix of Republicans and Democrats -- decided to run this year but either dropped out or lost a primary.

The new image of mayors as practical-minded technocrats has made them "more appealing to a statewide electorate than in years past," says Godwin of the University of La Verne. By contrast, "state legislatures and Congress have low approval ratings, and members are often automatically judged as ideological partisans."

Recent campaigns in California clearly show how the public appreciation of mayoral skills has risen, she says. "California's outgoing governor, Jerry Brown, touted his experience as Oakland's mayor as much as he did his long history in statewide office when he ran for governor eight years ago."

And in this year's gubernatorial primary to succeed Brown, she says, "Newsom ran as if he was still mayor of San Francisco rather than his current office as lieutenant governor."

*CORRECTION: A previous version of this story indicated thet California has a Democratic primary for governor. It actually has a top-two primary system.