St. Paul industrial contractor Corval Group, which barely survived the Great Recession, is a good example of how Minnesota companies are profiting from the North Dakota oil bonanza while we avoid the boom’s messy downsides.

North Dakota has turned into an energy mecca that has delivered state budget surpluses, the nation’s lowest unemployment rate and thousands of workers who get $15-an-hour-plus jobs in restaurants and convenience stores that serve $30-an-hour oil field and construction laborers who hail from across the United States.

But unless you’re a land or business baron, apartment mogul or bar owner, a boom also can be a community bust that tramples over zoning laws and local sensibilities.

“All these 18-wheelers wear down the roads that were not built for them,” said Nancy Carlson, a registered nurse, mother and 30-year homeowner and community volunteer in tiny Tioga, N.D. “We had to build a new water tower and tore up our streets for new water mains. We were awarded $10 million by the Legislature last session, but we need an estimated $26 million for basic infrastructure.’’

Corval Group, founded in St. Paul in 1921 as a family-owned heating-and-plumbing company, hopes to help with that infrastructure.

“We see ourselves as part of the solution to bringing energy to market in an environmentally responsible way,’’ said CEO Paul Jordan. “The refineries, roads, bridges and other infrastructure … will help the communities and be the sustainable stuff that will help people stay in North Dakota. For us, that’s exciting. And that’s what they want.”

Corval is developing North Dakota’s first refinery with American Indians on tribal land in Makoti, N.D. Over the next several years, Corval and other contractors will build a $515 million facility that will produce diesel and gasoline fuels for an oil-rich state that now has to import refined products.

The Minneapolis Federal Reserve Bank, whose region includes North Dakota, reported about the oil boom that the state’s spending will increase by 70 percent over the 2013-15 period, to $6.9 billion. Yet critics say that’s short of what hard-pressed localities need as small-town populations surge, taxing services from public safety to sewage treatment facilities.

Nancy Hodur, an economist at North Dakota State University, concluded in the Fed article that there is still a significant shortfall and “communities can’t keep up with demand for basic services.” The busiest highway in the state, near Williston, the hub of activity in western North Dakota, is a two-lane deathtrap, Hodur said.

Rob Grunewald, a Minneapolis Fed economist, said the Bakken area represents an “unprecedented amount of growth … a plus for the oil and gas companies and workers, and businesses who sell to them. But for pre-boom residents, the fixed-income elderly … there is more traffic and dust and pain of … rents going up three or fourfold.”

It will be a generation before we know whether North Dakota will go boom-to-bust or result in sustainable communities and industries that transcend the boom. Regardless, North Dakota energy is an economic driver that’s helping cut U.S. oil imports markedly. And Minnesota is a net beneficiary.

Minnesota’s financial institutions are banking on the boom and related development. Industrial companies, such as Ecolab, 3M, Donaldson and Graco, are selling equipment to the energy industry in North Dakota and other oil-producing states. Minnesota road contractors are engaged and manufacturers are churning out drilling and safety equipment.

Corval is also a contractor on gas refining plants and gas compressor stations that are the pipeline junctions for the mixed gases that otherwise are burned at thousands of oil wells. That’s an economic and environmental waste estimated at up to $1 billion annually by environmental groups.

Oil drilling has outpaced construction of the pipelines needed to capture and transport much of the oil and gas. The processed natural gas and gas liquids will become clean fuel for sale or the feedstock for plastics and other factories North Dakota seeks.

“Our job is to help them build the infrastructure,’’ said Corval President Jim Simon. “And that helps them with their next 50 years of economic development.”

A few years ago Corval was struggling with layoffs and little demand as a specialty commercial contractor.

“Brutal was an understatement,” Jordan said. “There were days we barely felt we were surviving.”

The company, which has grown from 325 employees to nearly 500 since its turnaround commenced in 2011, expects a 33 percent revenue increase this year to about $135 million.

The company’s northwest region, centered on the energy fields of North Dakota and Montana, will see its revenue grow about 50 percent to $70 million in 2013.

Not bad for a company based in oil-barren Minnesota.