Texas-refined gasoline fuels Mexican cars. Natural gas from Canada helps heat the Midwest and cool California. Electricity flows over the northern and southern U.S. borders in both directions.
The interconnections in the North American energy industry are huge and growing — and could grow even closer during the Trump administration unless it decides to alter the flow of a key U.S. export (and import) — at the border.
The U.S., Canada and Mexico have intentionally worked to combine the advantages of their energy resources. President-elect Donald Trump has said he would renegotiate the North American Free Trade Agreement between the U.S., Canada and Mexico. While the new administration seems to be very friendly to the energy sector, there are still questions about whether there could be changes that affect the intricate web of energy connections between the three countries.
"It's not so simple to say we're going to renegotiate the trade deals. We set up the system to create those inter-linkages. You just can't overnight legislate or executive order that away. If you try to do that, it's going to have negative economic impacts, not just for the economies on the border but for these specific industries, like energy," said Scott Anderson, chief economist at Bank of the West.
Trump's selection of former Texas Gov. Rick Perry as energy secretary, is seen as a positive for the oil and gas industry. Perry has spoken favorably about North America as an energy power house, including Mexico and Canada.
Perhaps one of the most surprising recent developments is the boom in U.S. natural gas that's flowing across the southern border, and the ambitious plans by the Mexican government to build more pipelines to take U.S. natural gas throughout Mexico and as far as Mexico City.
"Mexico has become a very important market for U.S. gas producers and without it, we'd be looking at lower prices," said Daniel Yergin, vice chairman of analysis firm IHS Markit. U.S. producers, grappling with low prices and record winter supply, would have to cap even more wells if it weren't for the growing demand from Mexico, which now accounts for about 5 percent of U.S. natural gas output.
The energy picture changed dramatically for North America in the last decade. The push by the U.S. energy industry into hydraulic fracking and horizontal drilling unleashed an energy boom, making the U.S. the world's biggest producer of natural gas and placing it firmly among the top three oil producers.
That has changed the situation for all of North America, at a time when Mexico's oil and gas output was in decline and Canada found some of its potential oil output landlocked. The ties between the three countries go way back. In the early 1900s, the U.S. began sharing electricity with its neighbors, and Canada is now a significant net exporter of electricity to the U.S.
One catalyst has been Mexico's program of energy reform, intended to break the hold of state-owned Pemex on its industry and bring new private investment to Mexico's energy industry. The decline in big part was due to a lack of investment by the government in Petroleos Mexicanos, and its increasing reliance on Pemex revenue stream for its own budget.
"Before shale, the U.S. was importing a lot more gas from Canada," said Anthony Yuen, global energy analyst at Citigroup. The U.S. was also worried not that long ago that it would need to import LNG, liquefied natural gas. But the shale boom changed everything.
Yuen said Canadian gas is still important to the U.S. West Coast, the Midwest and New England, in part because pipelines don't carry U.S. gas to those areas. Gas imports from Canada fluctuate based on weather, and can go from 5 to 7 billion cubic feet a day, he said.
"This speaks to how extensive the energy cooperation is between these countries," said Yuen. "It's almost as if the borders aren't really there. If you look at Canada and the U.S., they are part of the same cross-border electricity reliability councils for some regions. … It's not just natural gas, it's power lines, hydroelectricity and those are long-standing agreements and trade."
The U.S. energy boom has also been Mexico's gain, and Mexico, in turn, has changed the dynamic for the U.S. gas market . "Without exports to Mexico, the U.S. market would not be where we are right now. It would be way lower. Producers may not be drilling as many wells. Without Mexico, it would be tough," said Yuen.
According to Citigroup, new cross-border pipeline capacity of 7 billion cubic feet per day is expected to come on line by 2020, adding to the current capacity of 6 to 7 billion cubic feet per day. Energy Transfer Partners, (ETP) seeking to build the controversial Dakota Access pipeline in North Dakota, has approval from the Obama administration to build two pipelines to take gas from Texas to Mexico.
Trump's pick for energy secretary, Perry, sits on the board of Energy Transfer Partners.
Citigroup said the added pipeline capacity will come as Mexico undergoes a dramatic build out of power generation capacity and transmission lines. Mexico's energy secretary, speaking at an industry conference in Houston last spring, said there is a 75 percent savings from U.S. natural gas.
"Mexico had a pretty high cost of power in the past, because the country used oil as a power-generation fuel, and natural gas there is more expensive because of pipeline bottlenecks," said Yuen. "We would not be surprised if exports to Mexico by 2020 by pipeline would still be larger than U.S. LNG exports." Liquefied natural gas is currently being shipped from just one terminal in the United States, but the capacity is expected to expand.
According to the U.S. Department of Energy, the U.S. exported 4.2 billion cubic feet per day of natural gas to Mexico, through pipelines in August. The average daily exports through August were running at a yearly average of 3.6 billion cubic feet per day, 25 percent above last year and 85 percent above the five-year average. The U.S. produces 90 billion cubic feet per day of natural gas and consumes about 70 billion cubic feet, according to the Energy Information Administration.
Mexican demand can also help offset weather-related declines in U.S. demand, and for that reason it has helped support the price of gas.
"Mexico can serve as a balance," said Michael Cohen, head of commodities energy research at Barclays. "It's important regionally because right now you have a whole bunch of growth in production in the Northeast, and now you have constraints on that production getting out. The fact you have Mexican demand increases can balance out where the supply might come from in the medium term."
Mexico, in fact, now imports almost as much natural gas from the U.S. as it produces, and the U.S. in recent months has become a net exporter of natural gas for the first time in a sustainable way.
"It could very well be a case where there's some tweaking around on [NAFTA], as opposed to a big breakdown. Certainly, I am concerned a little bit about the Mexican economy. It's been a big driver of demand for U.S. gas," said Francisco Blanch, Bank of America Merrill Lynch head of global commodities research and derivatives. "The supply chains are very well integrated between the three countries. Changing the rules of the game on account of NAFTA would be pretty challenging not just for Mexico but for U.S. companies."
Mexican oil output has been in decline and is now at its lowest point since the early 1980s. The U.S. is producing about 8.8 million barrels a day of oil, down from a high of 9.6 million barrels a day last year, a direct result of lower crude prices. But the U.S. also imports another approximately 8 million barrels a day, and in September, about 520,000 barrels a day of that came from Mexico.
Canada is the biggest crude exporter to the U.S., sending 3.2 million barrels a day this year to the United States, of the 3.8 million barrels a day it produces, according to the Canadian Association of Petroleum Producers. CAPP expects Canadian production to increase to 4.9 million barrels a day by 2030.
"People just don't realize how integrated we are with these two countries," said Andrew Lipow, president of consulting firm Lipow Oil Associates. The U.S. is now a net exporter of refined products, and its biggest market for formulated gasoline and blend stocks is Mexico, which imported 390,000 barrels a day in September, about a third more than last year.
"Instead of Mexico spending a fortune building new refineries, they are buying from the U.S., and it turns out energy exports are now an important contributor to the jobs in our economy," said Yergin.
Canada, meanwhile, buys some U.S. crude to refine while sending the U.S. both oil and refined products. The U.S. imported 171,000 barrels per day of finished gasoline and blend stocks and 87,000 barrels a day of diesel fuel. Canada refines the crude in New Foundland and Nova Scotia.
"If it wasn't coming in, Maine would run dry," said Lipow. While it's not a lot of refined product, the Canadian fuel does supply gas stations from Maine to Boston. "It's pretty steady, but the point is, it keeps coming."
After the new administration enters the White House, the amount of oil that Canada sends to the U.S. could expand, since Trump has said he would overturn President Barack Obama's rejection of TransCanada's Keystone XL pipeline. The pipeline would take oil from the Canadian sands to the Gulf Coast of the U.S. "We remain firmly committed to Keystone XL. These are early days, and we certainly wish the transition team well as they move into government, and we look forward to some discussion down the road. But right now all we're prepared to speak to is the fact that we're committed to the project," a TransCanada spokesman said.
The contentious segment of the Keystone pipeline would run between Alberta and Steele City, Nebraska. It could move up to 830,000 barrels a day from the Canadian oil sands down to pipeline that would take it to the Gulf Coast refineries. Canada has the third largest proven reserves in the world after Saudi Arabia and Venezuela.
Electricity also flows back and forth over the border, and the U.S. imports more electricity than it exports.
In a 2015 report, the Department of Energy said there were 30 active transmission connections between the U.S. and Canada, trading about $3 billion worth of electricity in 2014.
The exchange of electricity with Mexico is less developed though it started back in 1905, when privately owned utilities in remote areas struck cross-border deals to share power over low voltage lines.
In 2015, the U.S. government granted Blackstone Group permission to export electricity from the Frontera power plant in the Rio Grande Valley to Mexico's newly opened electricity market this year. Mexican customers pay nearly twice as much as U.S. customers do for the power.
"Mexico is building some renewable projects along the border and that power is going to the U.S.," said Alex Wood, DOE policy analyst.
"It really is becoming more and more integrated," said Wood of the North American market. "Virtually all of Canada's surplus oil goes to the United States. The United States is producing surplus crude oil. … It's refined and it goes to Mexico."
Wood added that Sempra's (SRE) Energia Sierra Juarez wind farm in Mexico provides power to southern California.
More From CNBC