BISMARCK, N.D. (AP) — North Dakota Republicans nominated former Microsoft executive Doug Burgum Tuesday in a primary likely to decide the next governor, and voters also overwhelmingly rejected the Legislature’s move to loosen the state’s Depression-era rules prohibiting corporate farming.

The GOP battle between Burgum and his longtime friend, state Attorney General Wayne Stenehjem, featured a spirited and expensive debate about which candidate was better suited to revive a state economy that is slumping due to depressed oil and crop prices.

Burgum, a millionaire Fargo businessman, was expected to be a heavy favorite in November over Rolla Rep. Marvin Nelson, who ran unopposed in the Democratic primary and is seen as a longshot in a state that has not had Democratic governor since 1992.

Burgum thanked his supporters, volunteers and voters.

“This is an exciting night for the future of North Dakota and it’s a tremendous honor to have you support and your trust,” Burgum told cheering supporters at a Fargo art gallery.

In an interview with The Associated Press, Stenehjem said he had no regrets.

“We worked tirelessly and presented that vision we have for North Dakota that is one of optimism, and I continue to believe that,” he said. “We can hold our heads high.”

Burgum is the latest in a line of wealthy business people who have made the leap to the governor’s office. Rick Snyder and Bruce Rauner did it in Michigan and Illinois, respectively, in recent years.

The North Dakota Farmers Union led the campaign to reverse the Legislature’s decision last year to exempt pork and dairy operations from the state’s anti-corporate farming law. Campaign disclosure filings show the Farmers Union, which has more than 40,000 members, has spent more than $1 million to overturn the law.

Supporters of the so-called ham-and-cheese law say the exemption is needed to save the two dying industries by giving them more access to capital and opportunities to expand.

Opponents said family farming had served North Dakota well and that the law was an invitation for big, out-of-state corporations to set up operations in the state.

Eight other states have laws restricting corporate farming, though all allow exemptions for some livestock operations.

Republican Sen. Terry Wanzek, who farms near Jamestown, and Sen. Joe Miller, R-Park River, also a farmer, were primary supporters of the legislation.

Wanzek said he was not surprised at the result Tuesday.

“It’s a lot easier to mislead people than to tell the truth — this wasn’t going to open the state up to corporations to buy everything up,” he said. “The opponents defended the status quo and offered no solutions to help the swine and dairy industries in our state.”

Mark Watne, president of the North Dakota Farmers Union, was elated with the vote.

“The citizens of North Dakota do not support corporate farming and we should respect that,” he said.

Stenehjem, who was elected attorney general in 2000, won the Republican convention delegates’ endorsement for governor in April though Burgum vowed to stay in the race, crisscrossing the state in a 42-year-old bus with a leaky roof that logged some 16,000 miles and lost its muffler twice along the campaign trail.

Burgum is known in North Dakota as the godfather of software for building Fargo’s Great Plains Software into a billion-dollar business, which he later sold to Microsoft.

Burgum’s late brother, Brad, was Stenehjem’s roommate at the University of North Dakota law school. Brad Burgum also served as treasurer for Stenehjem’s successful bid for state House in 1976.

The latest campaign filings show Stenehjem raised more than $1 million in campaign donations for the primary race, including shifting $145,000 from his past attorney general campaign treasury within the past week. Burgum raised about $1.1 million, or about $60,000 more than Stenehjem’s total, filings show, but he also has personally funded his campaign.

Burgum had a much greater presence in television, radio and internet advertising. Stenehjem is a native of Mohall who grew up in Williston and had a wide geographic base, having lived in western, eastern and central North Dakota.

Burgum also promised in television advertisements to refuse a salary and a state pension if he’s elected North Dakota’s governor, even though state law does not allow that move and similar ones in the past have drawn criticism.

But state law specifies the salary of the governor — $133,000 annually at the moment — and does not say they have the option of taking less. Previous opinions by two North Dakota attorneys general have been critical of potential officeholders promising on the campaign trail to take less money.

Stenehjem, who is in the middle of his four-year term as attorney general, will continue to serve with the next governor and the agriculture commissioner on the state Industrial Commission, which regulates North Dakota’s oil industry.

__

Associated Press writers Blake Nicholson in Bismarck and Dave Kolpack in Fargo contributed to this report.