When gunmen in Mexico carried out one of the world's biggest ever gold heists this month, Canadian pit operator McEwen Mining was left looking at $8.5 million in lost metal.

Under pressure, its CEO Rob McEwen went on TV to reveal an uncomfortable truth: Mining companies in Mexico have had to deal with organized crime for years.

"The cartels are active down there. Generally we have a good relationship with them,” McEwen said on the Business News Network. "If you want to go explore somewhere, you ask them, and they tell you, 'no,' but then they say 'come back in a couple of weeks, we've finished what we are doing.' … They might be harvesting [drugs].”

His words made politicians really mad in Sinaloa state, where the gold mine is located. McEwen apologized and said he was referring to a good relationship with local "property owners and community members” rather than gangsters.

But many businessmen working in troubled parts of Mexico have long acknowledged the problem of organized crime. Gangsters have also tried to shake down multinationals, attacked operatives, and torched assets.

"There is lack of rule of law in some parts of the country,” says Jon French, a former U.S. State Department official who is now a security consultant in Mexico. "It has been bad for four or five years and I don't see any improvement under the current administration of President [Enrique] Peña Nieto.”

Some incidents have been made public. In March, thugs set fire to a local subsidiary of Houston's Key Energy Services in the Gulf coast state of Tabasco. Tabasco's top prosecutor Fernando Valenzuela said the attack appeared to be over extortion.

Last year, alleged members of the Zetas cartel used a homemade tank to fire at a hotel where employees of oil services multinational Weatherford were staying in Ciudad Mier, near the Texas border. Luckily, the employees were shaken but not injured.

And back in 2012, gunmen from the Knights Templar cartel set fire to more than 30 trucks and two warehouses belonging to a local potato-chip company owned by PepsiCo. The Templars said in messages they hung from bridges that the attack was because the company had worked with police. The company denied that and said it didn't know why it was targeted.

Some company insiders concede there are also more incidents they do not report for fear it will hurt their public image and share prices.

An employee of a global agricultural company said cartel members have stolen three of their trucks at gunpoint over the last year in rural areas where the cartels operate.

French said he has also helped companies fend off extortion attempts in the troubled states of Guerrero and Tamaulipas.

"We were able to discourage the cartels by explaining that it's a U.S. company, and U.S. companies cannot make under-the-table payments, so our hands are tied,” he said.

French advises his clients to never give in to extortion threats, even if it sometimes seems like the easiest option.

"If you start paying extortion, the price goes up, and it would become a never-ending situation,” he said.

In some cases, attacks on corporations are conducted by members of major cartels, which have diversified from drugs to a range of rackets, including extortion, oil theft, and wildcat mining.

But other cases involve gunmen who have broken off from cartels to form smaller gangs.

The Tabasco prosecutor Valenzuela described how a government crackdown on the Zetas cartel left many splinter groups. These gangs don't have the capacity to traffic, so they turn to shaking down workers and businesses.

"I have investigated kidnappers of local oil workers and found that they used to work for the Zetas, but now have no contact with the cartel,” Valenzuela told GlobalPost in an interview last year.

This violence comes as President Nieto makes a concerted drive to increase foreign investment, reforming energy, tax, and labor laws.

In August, he signed a law that allows multinationals to invest in Mexican petroleum for the first time since it nationalized its black gold in 1938. He also spearheaded efforts to overhaul Mexico's violent image and bring tourists back to its beaches.

His efforts helped attract a record $35 billion in foreign direct investment in 2013, although this fell to $22 billion last year.

Despite the news of violence against multinationals, foreign money still pours in. Automakers Toyota, Ford, and Volkswagen all recently announced billion-dollar investments.

Car companies often work in states that have seen less cartel activity, like Puebla, near Mexico City.

However, companies seeking oil and gold are often forced to venture into the most combative parts of the country. While mining and energy firms will often keep working in high-risk areas if the profit is there, Mexico's violence forces them to spend more on security.

McEwen said that after the gold theft his company will double defenses at the mine.

"It will look like Fort Knox,” he said. "We thought we were well protected, but we'll take it a step further.”

This article, by Ioan Grillo, originally appeared at GlobalPost.