Dan Kalil still remembers a nightmare he had once as a child. In it, he envisioned looking out over his family’s North Dakota farm and seeing it swarmed with strangers, bustling with unknown activity that filled the farm with a strange light. Kalil says the dream has stuck with him in the decades since. The eerie thing is that it came true.

Kalil, who chairs the Williams County Board of Commissioners in northwest North Dakota, about 60 miles south of the Canadian border, is a third-generation farmer. The land where he now grows peas, lentils and grains -- including barley used by Anheuser-Busch, one of his largest customers -- was homesteaded in 1906 by his grandfather who, like many of the area’s settlers, emigrated to rural North Dakota from Lebanon. Kalil considers the land “sacred ground,” part of the old farmer ethos that regards land as so revered that it shouldn’t even be used as collateral for a loan.

Then, two years ago, a crew of 14 people literally set up camp on Kalil’s farmland and began drilling an oil well that remains here to this day. It’s one of two wells on his land -- another will be built this summer -- and they could continue to pump for upwards of 30 years. As Kalil surveys his 8,000 acres, parts of which are littered with the unassembled pieces of an oil pipeline, he laments what’s happened to it. “It’s like my worst nightmare come true,” Kalil says. “We’ve been invaded.”

Kalil’s situation sounds outlandish, but it’s typical in many parts of North Dakota, where the owner of the land doesn’t necessarily own the mineral rights to the oil underground. Rights of mineral owners trump those of landowners. Kalil couldn’t stop the wells from going on his land, and although each well earned him a one-time compensation of $10,000 to $15,000 from an oil company, he says he’d be happier without the money and the wells. “We had such a magic place,” he says. “We are seeing the wholesale industrialization of western North Dakota.”

map What’s happening right now predates Kalil, his grandfather and the history of any of the 17 counties that are currently experiencing a boom in oil and gas production -- a boom that’s made their economies the envy of virtually every other place in America. Some 417 million years ago, a large oil deposit formed deep under what’s now the border between North Dakota and Saskatchewan. Fast-forward to the 1950s, when the first well tapped into the oil on land owned by a farmer named Henry Bakken. Today, the Bakken Formation is thought to be the largest oil deposit in the lower 48 states. Its 15,000 square miles -- spanning two states and two Canadian provinces -- hold some 4.3 billion barrels of oil ready to be tapped for drilling. (A forthcoming federal study will likely increase that estimate.)

While oil companies have been drilling into the Bakken for 60 years, a few factors have converged recently to bring a frenzy of new activity to the area. For one thing, new technologies involving hydraulic fracking and horizontal drilling have made it possible to extract oil from rock as thick as concrete. The high price tag of those techniques means they’re only economically feasible now that the price of a barrel of crude oil hovers around $100. Oil companies are now rushing to tap the ground before the cheap pre-boom leases they signed with mineral rights owners expire.

Last year, the state produced 113 million barrels of oil -- nearly tripling its pre-boom rate and making North Dakota the fourth-largest oil producing state, up from ninth just a few years ago. By the end of last year, there were more than 6,000 wells capable of producing oil and gas in North Dakota, and an additional 20,000 wells could be drilled within the next 10 or 20 years, followed by more than 30 years of pumping oil. The only thing that could stop a boom, experts say, is if oil plummeted below $40 or $50 per barrel, or the government cracked down on fracking. “This boom is just wild and crazy,” says Ward Koeser, mayor of Williston, the largest city in the center of the oil activity. “It’s more than you can fathom.”

For the past 100 years, the number of people in North Dakota has remained virtually stagnant. It’s the only state in the country that had more residents in 1930 than it does today. Now the population is booming in the western part of the state, where some parts of oil country saw their populations increase an estimated 13 percent from 2009 to 2010. “We had dying small towns that had resigned themselves to the fact that the mayor would eventually turn the light switch off when he left town,” says Vicky Steiner, a state representative who leads the North Dakota Association of Oil and Gas Producing Counties. Today, she says, “some of our communities that were dying are now flourishing.”

The Bakken boom has brought a population surge to the state, and the onslaught of new residents is straining public resources nearly to the breaking point. “They are definitely in a period of growing pains right now, and I mean pain in the literal sense of the word,” says Gov. Jack Dalrymple of the oil-producing communities. “It’s a boom. It’s a rush. That certainly isn’t pleasant for everybody, but I think most people realize that once they kind of get over this period of furious drilling activity, it’s really going to be a great thing for that part of the state.”

In a nation still reeling from the recession, spending time in this part of North Dakota can feel like visiting an alternate universe. In Williams County, where Williston is the seat, there are nine job openings for every resident looking for work. (Nationwide, there’s only one job opening for every four unemployed people.) The 1,500 residents in the town of Stanley, about an hour’s drive away, have seen their average household income increase 130 percent over the last decade. While many Americans struggle with underwater mortgages and declined credit applications, the Western Cooperative Credit Union is encouraging borrowers, flush with oil cash, to take out loans to buy jet skis and all-terrain vehicles. An advertisement in a local trade publication called Talkin’ the Bakken reads, “Big Toys Big Fun! What are you waiting for!”

The average worker in the oil and gas sector here earns more than $90,000 a year -- a sum so large that it’s pushed up incomes in non-oil sectors as well. The overwhelming majority of these oil jobs require a high school degree or less. The oil and gas workforce here has increased from 5,000 in 2005 to more than 30,000 today. The recession remains in their minds: Many hail from outside the state and are working grueling 80-hour-a-week shifts in hopes of earning enough money to save their homes elsewhere from foreclosure.

Meanwhile, the state has benefited enormously from taxes on the industry, which generated an estimated $839 million in FY 2011 and are expected to generate more than $2 billion over the next two years. As other states have been forced to make drastic budget cuts targeting education, public assistance and Medicaid spending, North Dakota recently approved a budget that increases spending by 12 percent over its upcoming two-year budget cycle. “This is a time of opportunity,” says Brad Bekkedahl, a Williston city commissioner. “It’s a time of growth. And it’s a time of amazing prosperity and wealth coming into our community.”

Yet many here echo the opinions of Kalil, who laments some of the challenges that Big Oil has imposed on the rural community. For starters, the region is a case study in an inflationary economy. As residents’ earnings soar, so too do the costs of goods and services. “Anything you can think of that a person would consume is also being consumed by folks in the oil industry,” says Dennis Lindahl, a city councilman in Stanley. “Merchants are able to charge an increased rate. Folks in town sometimes get a little upset from supporting the industry while not receiving benefits.”

The biggest struggle in the region, though, is the shortage of housing. When people in other parts of the country talk about a “housing shortage,” they don’t mean it literally. There are usually still plenty of available places for residents making decent money. But when people in western North Dakota discuss the housing shortage, they’re serious. There’s literally no place to sleep.

In the 1,200-person town of Tioga, Mayor Nathan Germundson recounts just how bad the situation is. He says one resident is actually sleeping in a church. The local radio station recently closed up shop and turned the property into a more lucrative business: an RV park. One group of truckers was sleeping in their vehicles and showering in the bathroom of a city park. When city officials put a lock on the door, it was broken off. For the lucky few who can get lodging here, the rents parallel those in major cities, easily topping $1,200 per month for a new two-bedroom unit. “As far as the city of Tioga goes, there hasn’t been a very good open line of communication between the industry,” Germundson says. “They just bring [workers] in. From what I gather, they don’t really care where they live or stay. They just care that they show up to work. They’re not really working with us to try to provide homes.”

Meanwhile in Minot, about 80 miles east of Tioga, the homeless population is increasing, and some housing developments have withdrawn from U.S. Department of Housing and Urban Development low-income programs in order to charge higher rents, says Minot Finance Director Cindy Hemphill.

Ron Ness, who leads the association representing oil and gas companies operating here, says the industry endeavors to find housing for its workers, and the proliferation of problematic housing situations may be due to workers who arrived here without steady work. He says the industry has a great relationship with local officials. “I think we’re seen as part of a solution.”

The housing crunch has left local communities facing a dilemma. Build too little, and they’ll wind up with a city overrun by RV parks and unsafe living conditions. Build too much, and they could repeat the disastrous situation that arose in the 1980s when the last boom went bust. Back then, many cities were happy to help developers fill the housing void by building infrastructure for new homes in the hopes that the units would not only accommodate their new residents, but also generate property tax revenue. Then, almost overnight, oil prices fell. The industry pulled out, and the developers left town since they owed more in property taxes on undeveloped land than the value of the land itself. In Williston, the city took ownership of those developments -- it eventually owned a quarter of the town -- and was stuck with more than $25 million in debt on the infrastructure without a tax base to pay it off.

This time, Williston and other cities have vowed to avoid repeating that mistake, taking a more measured approach to housing and requiring larger guarantees from developers. They’re also approaching the situation cautiously because they know the population will begin to decline dramatically sometime in the next 10 to 20 years, as the drilling phase of the boom is replaced by a slower phase in which oil steadily pumps from the ground without the need of much manpower. Drilling a new well creates about 120 jobs, but keeping it running only requires a single person. “You don’t build for 100 percent [of the growth]; you build for 20 percent,” says Gene Veeder, who leads economic development in McKenzie County, which has more active drilling rigs than anywhere else in the state. But, he concedes, it’s not an exact science. “My guess is no better or worse than anyone else’s.”

One solution for filling the housing void is the “man camp,” a type of temporary lodging for oil workers, typically provided by a third-party contractor, that can be trucked in and out of the region. The facilities could be described as more comfortable versions of college dorms. The notion of housing hundreds of guys in such close quarters initially made local leaders skeptical. But many of the facilities only allow residents who pass drug tests, and leaders say they like knowing that the structures will disappear when the industry does. Last year, the Olympic village that hosted athletes at the Vancouver games was shipped here to house oil workers.

The other major impact of the industry is the damage to the county road system, a grid that in many places comprises little more than two-lane gravel and dirt roads. Initially designed for farm-to-market travel, they weren’t built for the big trucks that use them to access rigs and wells. Drilling each new well requires more than 2,000 truck trips, and the heavy rigs are destroying the roadways. “Simply put, the roads are falling apart in many cases,” says Alan Dybing, a researcher at the Upper Great Plains Transportation Institute, which estimates that fixing the roads will require an investment of more than $900 million over the next 20 years. The situation reached a boiling point earlier this year when Williams County closed the entire county and township road system to oil trucks. Local leaders insisted the move was necessary since the roads had deteriorated to the point that they were unsafe, although some critics have suggested it was also intended to send a message to the industry.

In addition to road damage, traffic related to oil work has caused notoriously slow commutes. The joke used to be that a traffic jam in North Dakota was four cars approaching an intersection, with all the drivers being too polite to move first. Nowadays, driving can be exhausting, as slow-moving trucks are difficult to pass on narrow, two-lane roads. Drivers may be forced to stop suddenly in the middle of their commutes when those roads undergo maintenance and are reduced to a single lane.

One aspect of the drilling that’s gotten negative attention elsewhere -- hydrofracking -- is not getting widely attacked here. That’s because the process takes place nearly two miles below ground, deeper than in other parts of the country, which defenders say reduces the risk of contamination. But there are environmental concerns. Earlier this year, the state levied $3 million in fines against 20 oil companies that failed to secure oilfield waste pits from flood waters that carried the gunk into the environment. “We take it very seriously,” Gov. Dalrymple says. “We want them to know there’s going to be some serious financial pain if they don’t pay attention.”

The state is undergoing a review of its industry regulations that could dictate stronger environmental protections when drilling occurs near sensitive areas. Meanwhile, the state is set to double the number of oil field inspectors over the next two years.

Beyond roads and environmental concerns, virtually all major infrastructure in the boom cities and counties is strained or exhausted. Dickinson, the largest city on the south side of the Bakken, has identified more than $97 million in infrastructure needs, including a truck bypass, a new fire substation, an upgraded wastewater treatment plan and everything in between that’s required to keep up with the growth. Williston has identified $89.4 million in similar needs, while Minot has highlighted $122 million. “The oil industry can overrun a community,” says Dickinson Mayor Dennis Johnson. “We don’t want to be a junky oil town.”

To the outsider, it may seem local governments should be flush with cash. But that’s not the case. In 1951, after oil was first discovered in North Dakota near Tioga, local governments began levying property taxes on the wells. Just a few years later, the state Legislature stripped the locals of that authority. Now oil taxes flow directly to the state and are then parceled back out to local governments through a series of formulas and grants. Much of the money, however, goes to the state general fund and other state accounts. A large county typically gets about 10 percent of the oil tax revenue that originates within its borders, says Steiner of the Association of Oil and Gas Producing Counties.

Take the case of Mountrail County, where nearly 40 percent of last year’s state oil tax revenues originated. According to county documents, only $16 million in state oil tax revenue was allocated directly back to the county, its cities, its schools and a special infrastructure fund -- even though more than $313 million of that revenue originated there.

Williams County, located in the center of the boom, is operating under an $11 million budget, up from $9 million five years ago. That’s steady growth, to be sure, but it’s not a windfall. With property values skyrocketing, the slow revenue growth might seem counterintuitive. But Williams and other localities have actually reduced their tax rates to keep residents from facing an enormous burden. While the value of the city’s tax base nearly doubled over the last five years, its property tax revenue increased by less than 40 percent. The policy is typical in a state where residents have a notorious aversion to property taxes and will vote next year whether to abolish them altogether.

While spending in Williston has doubled, much of that money is borrowed or comes from the state. “There’s no more revenue [than usual], but you have no choice,” says Koeser, the mayor. “You have to have more law enforcement. You have to have more building inspectors. For a few years, it makes it very difficult.”

To help with that task, Gov. Dalrymple recently signed a law providing a combined $35 million for Williston, Minot and Dickinson, the largest cities in oil country, and $65 million for counties, townships, school districts and smaller cities in the area. That’s on top of an upcoming state transportation budget that includes $228.6 million for state highway projects in the oil zone, as well as $142 million for city, county and township roads in the affected region. Williston leaders expect about $20 million of the special aid. “It’s still pennies,” says Bekkedahl, the city commissioner. “But we’re very appreciative to have it.”

Critics like Kalil highlight those demands as evidence of an unsustainable pace of growth here. He doesn’t oppose the oil industry itself, but he thinks it’s all too much, too fast. The localities can’t control when and where drilling is allowed, so the only way to slow the pace would be for the state to curtail the number of drilling permits it hands out. That’s an idea that’s been floated by several local officials -- and one that almost surely will fail to gain any traction at the state capitol in Bismarck. “Every time you bring up the subject, it’s like the third rail, like Social Security,” Kalil says. “Permits are what’s driving the economic activity of the state.”

As Gene Veeder sits at his desk at McKenzie County courthouse, he flips through two dozen business cards from companies that have expressed interest in doing business in the area. He acquired them over just two days. This is the type of job any economic development official would kill for. But, Veeder says, “You don’t want to get complacent. You have to diversify, because this is cyclical.” So Veeder, who works for the county that has more rigs than any other, is focusing on business development beyond the oil industry. He recently retained the largest bank in the western half of the state, and his office has helped create a revitalized downtown in Watford City, the county seat, complete with new buildings and storefronts.

Pursuing that kind of diversity may be difficult, since the growth of the oil industry in the region is likely crowding out other sectors. The state is trying to promote industries other than oil and gas, such as companies involved with unmanned aircrafts, manufacturing associated with wind energy equipment and data centers. But the remoteness of the western part of the state, along with the high cost of labor, means doing business there is expensive and complicated. Most of the companies interested in locating to the Bakken area are those developing products specifically for the oil industry. That means western North Dakota might see the energy industry become even more concentrated, potentially exacerbating the problems communities will face when it leaves.

On the bulletin board behind his desk in City Hall, Koeser, the Williston mayor, has tacked a quote attributed to Theodore Roosevelt, the president so closely associated with North Dakota that the national park here bears his name: “Do what you can, with what you have, where you are.”

That’s the approach many local leaders are trying to take. Given the historic decline of some of the cities here, they may be able to capitalize on the short-term growth and build up infrastructure that will serve them for years to come, long after the industry pulls out. They’re also hoping to avoid the mistakes of the past. “We have learned to appreciate the industry,” Koeser says. “It’s not the prettiest viewscape for people coming into your city, but if you’re going to be an oil town, that’s what you’re going to have.”

For more photos, please visit the slideshow North Dakota's Ghosts. Despite the state's booming population, North Dakota still has a lower population than it did in 1930. Evidence of that decline still permeates the landscape, where abandoned schools, churches and homes dot the back roads.