Just when we were getting used to the surge in natural gas production, a second unexpected U.S. energy boom enters the picture: oil.

Last year, thanks to drilling technologies that can access hydrocarbon deposits trapped in deep rock, American crude-oil output rose to 8.9 million barrels a day -- an increase of more than a million barrels, thelargest in U.S. history.

Since 2008, the rise in U.S. oil extraction has amounted to Nigeria's entire oil production,author Daniel Yergin points out. And the expansion could keep going, as estimates of North Dakota's potential get bigger and as California moves to allow hydraulic fracturing in the Monterey formation, thought to contain almost two-thirds of U.S. shale oil.

Already U.S. oil imports have fallen by half, to 6 million barrels a day from 12 million in 2007.

"No one had any idea that this could occur," Paul Sankey, an oil analyst for Deutsche Bank said yesterday in Washington at a Bipartisan Policy Center meeting meant to sort out what all of this means.

The boom is bringing millions of jobs to the U.S. and helping to stabilize world oil prices. By increasing the global supply, it's also enabled countries such as Japan, China India and Turkey to reduce the amount of oil they buy from Iran.

Along with these benefits, the U.S. oil boom creates new challenges for policy makers. The first of these is what to do with all the crude. U.S. refining capacity can handle only so much, and a 1979 law limits crude exports to Canada and Mexico. Getting Congress to change this might be a problem, because of the widespreadmisimpressionthat domestic oil could directly push down U.S. gasoline prices. But just as it is now wise to allow more exports of liquefied natural gas, it will become important to ensure that the U.S. can sell its growing supply of crude worldwide.

Another looming challenge is the decaying network of pipelines crisscrossing the U.S. Increasing use of the old-fashioned conduits is risky. As Sankey said yesterday, the environmental threat is "enormous," and it would be smart to look at the construction of the Keystone XL as a starting point for creating a new, safer pipeline system.

That wouldn't be cheap; Keystone alone is estimated to cost $7 billion, and any other new pipelines should match its safety specifications. Somesmaller pipelines are already in the works to relieve the bottleneck that has developed in the middle of the U.S. The trick will be to make sure oil transporters have as much incentive to upgrade or replace their aging pipelines.

This column does not necessarily reflect the opinion of Bloomberg View's editorial board or Bloomberg LP, its owners and investors.

To contact the author on this story:
Mary Duenwald at mduenwald@bloomberg.net