My view from the window seat of a small regional jet landing in Midland, Texas, is either a testament to the advances of human civilization or a sign of its impending demise, depending on your perspective. Countless oil wells, identified by their glowing red flames, dot the dark landscape.

We are descending into the Permian Basin, the heart of American oil country, where the massive oil and gas boom is changing not just Texas but also the nation and the world.

This year the region is expected to generate an average of 3.9 million barrels per day, roughly a third of total U.S. oil production, according to the U.S. Department of Energy. That’s enough to make the U.S., as of late 2018, the world’s largest producer of crude. The windfall has turned a nation long reliant on foreign oil into a net exporter in a few short years.

Not even the plunge in oil prices in recent months, which led some companies to scale back their plans for the Permian, has stopped the enthusiasm. Analysts predict the region’s output will expand in coming years, thanks to cost-reducing advances in hydraulic fracturing, better known as fracking, to release oil from shale, plus changes in U.S. export policy. By 2025, U.S. oil production is expected to equal that of Saudi Arabia and Russia combined, according to the International Energy Agency (IEA).

The power of the Permian oil and gas boom is easy to spot in the basin itself, which stretches across more than 75,000 sq. mi. of scrubby ranchland in West Texas and New Mexico. So-called man camps–hastily constructed short-term housing for oil-field workers–have sprung up everywhere, amid new luxury construction projects and shiny billboards advertising Rolexes to laborers pulling in six-figure salaries. But the impact extends far beyond the region.

During the past three years, the boom in these parts has transformed the U.S. economy, upended the international energy industry, undermined global environmental efforts and tilted the balance of power among Beijing, Moscow and Washington. In places like Saudi Arabia, uncertainty over future oil profits driven by rising U.S. production contributed to a rethinking of the economy. In theory, less reliance on Saudi oil also gives the U.S. more leverage in other areas, like the war in Yemen, although the Trump Administration hasn’t prioritized such efforts. The vast new U.S. oil reserves have provided cover for the imposition of tough sanctions against nations like Iran and Venezuela, moves that at other times might have crippled global supply. And around the world, the boom in the U.S. has inspired other countries to race to develop their own shale resources. “In a shale revolution world, no country is an island,” says Fatih Birol, who leads the IEA. “Everyone will be affected.”

The question is how. Presidents Donald Trump and Barack Obama have championed the nation’s growing oil and gas markets. Abundant new shale reserves have driven economic growth and regional job creation while reducing costs for American consumers and manufacturers.

But analysts across the political spectrum caution that the energy windfall presents profound challenges as well. Neither energy markets nor national security are simple, and they overlap in complex ways here. In the long term, the boom actually threatens to undermine bipartisan efforts to establish U.S. energy independence. It could destabilize international partnerships, make the U.S. vulnerable to trade retaliation and raise formidable new hurdles in the ongoing effort to curb climate change. The nation’s response to the opportunities and risks raised by the Permian Basin boom will shape our economic, environmental and geopolitical prospects for generations.

Oil workers, known as roughnecks, extracting oil at a Midland rig in May 2018; many laborers earn six-figure salaries because of high demand Benjamin Lowy—Getty Images

There’s nothing quite like oil country in boom times. Across the Permian, gas stations, retail shops and fast-food restaurants advertise perks like $15-per-hour pay and 401(k) benefits as they compete to lure workers. Bare-bones motels charge hundreds of dollars a night. Local restaurants, patronized by women clutching designer handbags, charge $18 for a salad.

The surge in production in the Permian came at a propitious time. In the aftermath of the 2008 recession, oil demand spiked just as drilling technology unlocked layers of rich shale. Locals are eager to tout the spoils. In Odessa, Texas, entrepreneur Toby Eoff shows me the defunct theater the city is paying to renovate to house stage productions. Next door, Eoff and his wife are building a $79 million Marriott and conference center. Collin Sewell, who runs a group of car dealerships in the region, points out the window of his brand new office to the lot full of Ford trucks his employees serviced that day. When I visited him in September, his sales were up 50% from 2016.”When it’s good, it’s awesome,” Sewell says.

A couple hours away, in Hobbs, N.M., population 37,000, Mayor Sam Cobb gave me a tour of a brand new, $61 million recreation center, supported by the city’s growing tax base. It’s 158,000 sq. ft., with two four-story-tall water slides that loom over a giant pool, a soccer field and basketball and racquetball courts. Residents work out on Technogym equipment, the Rolls-Royce of exercise gear.

While previous oil booms have ended in busts that devastated the region, local officials say this time is different. In the past, high oil prices fueled short-lived enthusiasm that dwindled when the price of crude dropped. But recently, drillers have flocked to the Permian despite low oil prices, in part because fracking and other technological advances have made extraction so cheap. Drillers strike crude in areas inaccessible just years ago. “We’re not looking for hydrocarbons, because the hydrocarbons are there,” says Vicki Hollub, CEO of Occidental Petroleum. “The Permian will continue for many years to come.” A report from the Federal Reserve Bank of Dallas estimates that new Permian oil wells break even around $50 a barrel–far less than the $80 that Saudi Arabia spends on average, according to the International Monetary Fund, to extract the same quantity of crude. “We don’t use the B word,” says Bobby Burns, president of the Midland Chamber of Commerce. “Boom doesn’t really describe it.” The Permian, he says, will be a force for a generation.

The main problem at this point, energy executives say, is there’s not enough infrastructure to handle all the oil and gas coming out of the ground. As a result, many drillers simply burn off valuable natural gas rather than capturing and selling it. Companies are also struggling to ship oil. In 2017, more than a quarter of U.S. oil exports–112 million barrels of crude–left from the port of Corpus Christi, Texas. The world would have taken much more, which is why a $327 million expansion is under way, the centerpiece of a slew of projects that could double the port’s export capacity in the coming years. When it’s completed later in 2019, a new crude-oil pipeline planned by a partnership of three companies will link the Permian oil fields and Corpus Christi, winding some 730 miles through Texas backcountry, picking up cargo along the way. It’s expected to transport 550,000 barrels of crude every day to ships that will carry it around the globe.

Environmental groups have opposed the new pipelines and expansions. The more oil and gas that’s pulled from the earth, transported, exported and burned, they argue, the faster the climate warms. But energy executives point to the region’s vast reserves and to demand. “It’s got to go somewhere,” says Brad Barron, the CEO NuStar Energy, a pipeline company operating in the Permian and Corpus Christi.

All this has come with costs. The man camps and other temporary housing facilities have been marred by crime and drug abuse. Home prices have soared. Roads and highways, many designed for ranchers, have become overrun by trucks and tankers, making them some of the most dangerous in the country. (During a violent storm in September, I pulled to the side of the highway in Andrews County, Texas, for half an hour, uncomfortable with careening big rigs in low visibility.)

But the most detrimental effects may be the hardest to see. Some locals, like Sharon Wilson, worry about the ramifications of nonstop fracking operations in their backyard. A Texas native and former oil company employee, Wilson is an organizer with Earthworks, a Washington-based environmental group. Using an infrared camera to capture images of gas leaks, she says she regularly detects dangers leaking from wells, including methane, a greenhouse gas that is responsible for about a quarter of global warming worldwide. Some locals have also suffered from exposure to other substances, she says, including benzene, a chemical in crude classified as a carcinogen. While it’s difficult to measure the broad scale of the Permian’s environmental impact, or its localized effect on health, Wilson says the leaks in the basin today are the worst she has seen in her years of tracking leaks. “Nothing can even come close,” she says. “It’s unimaginable what’s happening out there.”

Pipes at NuStar Energy’s facility in Corpus Christi, Texas, a key port linking oil from the Permian Basin to the world. Brandon Thibodeaux—The New York Times/Redux

The Permian boom transformed America’s place in global energy markets almost overnight. Until recently, federal law forbade American producers from exporting crude oil at all, a policy holdover from the 1970s, when energy shortages racked the nation. But in the first decade of the new millennium, fracking and horizontal drilling opened vast new reserves of previously untapped oil. Public policy changed too. In December 2015, Obama signed a bill negotiated by congressional leaders that lifted the four-decade ban on exporting crude.

The resulting explosion in oil production has remade swaths of the U.S. economy and acted as something of a nationwide stimulus package. By helping keep the price of oil and gas low, domestic energy production aided other industries as well, tamping down the cost of air travel, trucking and even agricultural goods, because of the reduced cost of the diesel fuel many farmers rely on.

But determining the economic value of all this new oil and gas requires complex calculations. Using oil production as a pillar of the economy sounds good when prices are low, but it could hurt down the road. Consider energy security. Policy experts across the ideological spectrum have long insisted the best way to curb oil dependency is to develop diverse energy sources. That’s why President George W. Bush, who lived in Midland as a child, signed a bill imposing more stringent fuel-economy standards, and it’s one of many reasons Obama embraced funding for renewable energy. It also explains why GOP lawmakers who champion fossil fuels and express skepticism about climate change have also supported research into alternative energy.

These measures make sense no matter how much oil the U.S. produces, especially because the price of crude is sensitive to global events. Instability in Iraq or a burst pipeline in Canada can bump the price at the pump for U.S. consumers. The abundance generated by the Permian may obscure the risks posed by our reliance on oil, says Jason Bordoff, who advised the Obama Administration on energy and climate policy and now heads Columbia University’s Center on Global Energy Policy. “It’s not just boom and bust that hurts,” he says. “Volatility itself hurts people.”

A gas flare shown here in May 2018 burns off excess gas in Midland, Texas, part of the Permian Basin, where an oil boom has remade the landscape. Benjamin Lowy—Getty Images

Moreover, while the U.S. is now a net oil exporter, the boom may have given political and industry leaders a false sense of security. One reason is that the U.S., despite the treasure trove beneath the Permian, doesn’t have the ability to process much of what it produces. Many of the refineries sprinkled across the Gulf Coast aren’t built to work with U.S. crude oil, which is lighter than the product the U.S. imports from countries like Venezuela and Canada. As long as that’s the case, the U.S. has to continue importing oil even if, in theory, it’s producing enough of its own.

For decades, safeguarding access to imported oil has been a pillar of U.S. foreign policy. That’s meant carefully maintaining relations with petrostates like Saudi Arabia and using the military to ensure stability in resource-rich regions. Under Trump and Obama, the U.S. has sought to strengthen ties with countries that import oil and gas as well. It’s unclear how this new dynamic will shape U.S. relations abroad.

George David Banks, a former Trump Administration energy adviser, says the Permian windfall has expanded U.S. soft power. “The whole transformation has put us back into a role to help define the policy of global energy production and not just as a consumer,” Banks says. But others analysts worry that if the economy becomes dependent on crude exports, the U.S. could become increasingly vulnerable to retaliatory tactics. Washington officials saw a glimpse of that in 2018, when China threatened to impose tariffs on U.S. oil and gas amid the trade war between the two superpowers.

All these questions set aside the primary challenge arising from the U.S.’s newfound oil reserves. Burning fossil fuels causes climate change, and the more oil and gas the U.S. produces and exports, the faster the world will warm. Many Americans see the issue through a moral lens: by drilling in the Permian Basin today, we contribute to a sicker world for future generations. Research has shown the world needs to halve greenhouse gas emissions by about 2030 to keep temperatures from rising to unsafe levels. That will be hard enough without unabated drilling in the Permian or anywhere else.

Trump has dismissed such concerns. Since taking office, his Administration has systematically slashed environmental regulations and sought to open vast new areas to drilling, including coastlines and federal lands. In theory, those moves help U.S. oil and gas companies. And while many industry leaders have praised the policies, others see reasons for long-term alarm. As Europe and the rest of the world impose increasingly stringent regulations on imported oil and gas, American energy companies–particularly large multinational corporations–could find themselves pariahs on the global market. French President Emmanuel Macron suggested last year that high-carbon products from countries that aren’t committed to addressing climate change could face additional trade barriers, an idea that has gained attention among stakeholders working to deal with the issue.

Perhaps it’s no surprise then that a handful of energy companies, including Shell and Chevron, have begun to change some of their climate policies, including calling for measures like a carbon price. ExxonMobil asked the Environmental Protection Agency (EPA) in December to uphold an Obama-era rule on methane emissions that the Trump Administration has sought to weaken. “Reasonable regulations help,” the company said in a letter to the EPA.

Hollub, the CEO of Occidental, whose company is one of the biggest drillers in the Permian, has chosen to focus on capturing and storing CO[subscript 2], even as the Trump Administration has rejected calls for a carbon tax or other forms of carbon pricing. The company benefits from a tax incentive for doing so. But Hollub also says she sees a long-term strategic advantage. “Ultimately, there will be a carbon price,” she told me in an interview at the company’s Houston headquarters.

A carbon price is just one way to manage the boom that struck the Permian. And whether you see the boom as a testament to human ingenuity, a threat to civilization or maybe a little of both, it needs to be managed.

This appears in the January 14, 2019 issue of TIME.

Get The Brief. Sign up to receive the top stories you need to know right now. Please enter a valid email address. Sign Up Now Check the box if you do not wish to receive promotional offers via email from TIME. You can unsubscribe at any time. By signing up you are agreeing to our Terms of Use and Privacy Policy . This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply. Thank you! For your security, we've sent a confirmation email to the address you entered. Click the link to confirm your subscription and begin receiving our newsletters. If you don't get the confirmation within 10 minutes, please check your spam folder.

Write to Justin Worland at justin.worland@time.com.