MEXICO CITY—If all goes well, drillers responsible for a shale-oil bonanza in Texas will soon cross the southern US border and extend the hydraulic fracturing boom to Mexico. But first the Mexican government, foreign oil companies or some combination of the two will have to neutralize some of the most savage gangsters in the world.

Oil and gas were a key subtext of yesterday’s North American summit between Canadian prime minister Stephen Harper, Mexican President Enrique Peña Nieto and US President Barack Obama. Hoping to join the US and Canadian energy boom and invigorate the laggard Mexican economy, Peña has pushed through a dramatic reversal of the country’s seven-decade-old ban on private oil and gas drilling. His goal is to lure companies that are drilling in the deepwater Gulf of Mexico and the Texas shale patch to lead the development of Mexico’s potential 42 billion barrels of oil.

Trade rules will have to be relaxed to allow the US companies to quickly move labor and special equipment back and forth across the border when needed, experts here say. But more importantly, Peña has to deal with the Zetas and Gulf Cartel, two vicious drug- and gun-running gangs whose turf overlaps Mexico’s shale patch. Nabbings, extortion, murder and oil theft by the gangs have made US drillers—traditionally cavalier about violence in the areas where they work—wary of venturing into the shale-rich states of Tamaulipas, Coahuila and Nuevo Leon.

“Tamaulipas is not in government control. There is not a single business there that in some way does not pay off the organized crime groups,” said Louie Palu, an American war photographer who reported in the gang-run states from 2011 to 2013.

Peña has set a target of raising Mexico’s oil production to 3 million barrels a day by 2018, a 25% increase from 2.4 million barrels a day today. But in shale, Mexico is essentially starting from scratch. State oil company Pemex, until now a monopoly, has drilled only a handful of shale wells. Meanwhile, just across the border in Texas, 11,000 well permits have been issued for the Eagle Ford shale in the southern part of the state. They have been drilled by wildcatters like Apache, Devon and Petrohawk, companies that have helped to resurrect Texas as a global oil powerhouse.

Eagle Ford alone produces some 1.2 million barrels of oil a day, and half of the 38,000 square mile field lies within Mexico. While no other nation has managed to duplicate US and Canadian success in hydraulic fracturing—the method used to drill shale oil and gas, popularly known as fracking—Mexico has perhaps the best shot because it can access the Eagle Ford.

“It will be a game-changer if we are successful in bringing down the successful shale operators from the US,” industry consultant Luis Miguel Labardini told Quartz.

But businesses operating in the Mexican states bordering shale-rich Texas and the Gulf of Mexico have been especially vulnerable to gang extortion. Pemex, operating conventional fields in the region, has also suffered from theft, often assisted by oil workers in cahoots with the gangs. Last year, Pemex found 539 siphons along its pipelines in Tamaulipas.

The Zetas and Gulf Cartel are somewhat weakened after a government crackdown the last two years—Zetas kingpin Miguel Angel Trevino Morales was arrested last year in Tamaulipas, for instance. And Peña last month unveiled a new national agency to strike at the gangs. Yet kidnapping was up by 20% last year, carried out by surviving factions and remnants. Kidnappers have tended to target Mexicans and not foreigners, but that will be slender consolation given that most of the employees working the fields will be locals.

“They’re very violent, these drug dealers,” said Montserrat Ramiro of the Mexican Institute for Competitiveness. “You have to be vigilant of your employees so they don’t get kidnapped. If you don’t have a beefed-up security strategy, you can be extorted.”