North Dakota generally practices status quo politics. The state has a populist tradition, but it's rare for an underdog to win against a well-established politician.

That might change on Tuesday.

In the GOP primary for governor, a Donald Trump-supporting software millionaire has a chance of beating one of the state's longest-serving politicians in the race to replace Republican Gov. Jack Dalrymple, who is not seeking a second full term.

Wayne Stenehjem, the state's attorney general since 2001 and a lawmaker since the 1970s, began the year as Dalrymple's near-certain replacement. A February poll showed Stenehjem leading Doug Burgum, a former top executive at Microsoft, 59 to 10.

But Burgum has outspent Stenehjem since joining the race in January, casting the attorney general as part of an old guard that's responsible for the state's economic downturn and budget shortfall.

The conventional wisdom heading into Tuesday's primary is that Stenehjem has maintained a small advantage, but no one will be terribly surprised if Burgum emerges as the winner. Without more recent public polling, political experts have to rely on guesswork to make predictions.

"Burgum has done a very good job of catching up and making it, from my view, very close," said Bruce Gjovig, who directs the University of North Dakota's Center for Innovation.

On the Democratic side, state Rep. Marvin Nelson is running unopposed for the nomination but isn't expected to present a serious challenge for whoever wins the Republican race. North Dakotans haven't elected a Democrat for governor since 1988.

Gjovig, who cohosted a fundraiser for Stenehjem, describes both candidates as "very good and dear friends of mine." Many Republicans -- including former GOP Gov. Ed Schafer, who gave Burgum his highest-profile endorsement -- say they would be happy with either candidate. But Schafer's endorsement suggests the moment may be ripe for an outsider.

"With a down cycle in the economy, you have to look at things in a different way," said Schafer. "You have to hold things almost at arm's length and say we've got to change our ways of doing things."

North Dakota is one of the most oil-dependent states in the country. When oil prices sank last year, so did North Dakota's revenue, leaving a billion-dollar budget hole. For the first time since 2002, lawmakers had to slash state spending this year. Looking ahead to next year, Gov. Dalrymple is instructing almost every department to submit budget plans that would cut spending by 10 percent. While there's still plenty of money left in the state's rainy day fund, lawmakers this year had to dip deep into it to fill the shortfall.

Despite the end of the oil boom, Stenehjem insists the state is still in good shape -- and there's evidence to support his argument. The state's unemployment rate, at 3.2 percent, is well below the national average. There's growth in sectors such as aerospace. Still, "voters tend to believe the negative argument," said Rob Port, who edits the North Dakota politics blog Say Anything.

Stenehjem, however, has the support of the outgoing Gov. Dalrymple and former governor John Hoeven, who's now a U.S. senator. He also received the state GOP's endorsement in April.

In addition to castigating Stenehjem as a "40-year career politician," Burgum has criticized the attorney general for offering only tepid support to Donald Trump. Stenehjem says he'll support the party's presidential nominee but avoids mentioning Trump by name. Burgum, by contrast, endorsed Trump last month, saying "voters are looking for a political outsider because the status quo isn't working for many Americans."

Opinions differ as to whether Burgum's full-throated support for Trump will help him in North Dakota. The state has a populist tradition, and voters tend to like politicians who take on the distant Washington establishment. But that doesn't mean voters blame state officials for problems with the economy, which, according to Mark Jendrysik, a political scientist at the University of North Dakota, they understand are the result of a global decline in oil prices. The poll back in February showed that North Dakotans were generally pleased with the direction of their state, even as most of them believed that the country as a whole is on the wrong track.

For all the heat of Burgum's rhetoric -- and the millions he's put into broadcast advertising, push polls and mailers to spread his attack -- voters will have a hard time distinguishing between his actual platform and Stenehjem's.

"Finding a real difference between them on major policy positions is pretty hard for the average voter," said Jendrysik.

Nevertheless, one of the big question marks is whether Democrats and independents, who can vote in the open GOP primary, will come out in significant numbers to vote for Burgum, who's perceived as more progressive on social issues such as abortion and gay rights. If Burgum can turn out lots of new or occasional voters, many expect he will prevail.

But no one knows. This unexpectedly tight race will remain unpredictable right until the end.

"Everyone's operating in the dark," said GOP state Sen. Ray Holmberg. "They're operating on anecdotal stories and not much else."