MEXICO CITY—The body count from Mexico's war on organized crime keeps growing, but so too does the country's economy. The economy grew 1.34% during the third quarter, an annual pace of 5.5% growth, according to data released by the national statistics institute on Tuesday. The figure, fueled by domestic demand and a jump in agricultural production, beat expectations and suggests Mexico's economy will grow roughly 4% for the year as a whole. Drug-related violence in Mexico has killed an estimated 46,000 people since President Felipe Calderón took power in December 2006, according to government and newspaper estimates. The carnage costs Mexico roughly one percentage point of annual economic growth, say estimates from BBVA Bancomer, the country's largest bank. Surveys show two-thirds of Mexicans say they haven't made a trip or bought a big-ticket item due to fears of drawing the attention of criminals. In much of northern Mexico, businesses pay extortion taxes to drug gangs—a tax that hurts profits. Crime also raises transport costs and other security-related expenses. The bloodletting has also badly damaged the country's brand, leaving Mexico conspicuously absent from the fast-growing BRIC group of emerging market nations that comprises China, Brazil, Russia and India. But fears that the violence would sink the broader economy have proved ungrounded, at least for now. Job creation has picked up steadily, consumer credit is expanding, and domestic sales of items such as cars and flat-screen television sets have grown at a double-digit clip this year. "Mexico is holding up well, particularly taking into account the violence here and what's happening in the world, including the U.S. economy," said Claudio X. Gonzalez, chairman of Kimberly-Clark de Mexico SAB. Despite the strong growth, many economists expect debt troubles in Europe and weak U.S. growth to create stronger headwinds for the Mexican economy in the coming quarters, slowing growth next year. "There is no getting away from the fact that the outlook for the next year or so remains challenging," David Rees, an emerging-markets economist at Capital Economics, wrote in a note to clients on Tuesday. Mexico's overall track record during Mr. Calderón's presidency has been weak. Even after an expected 4% growth this year, the country's average annual growth in the five years under Mr. Calderón will have been a paltry 1.55%—below the Latin American average. The weak growth can be attributed to a single bad year—a 6.12% plunge in 2009 amid the global financial crisis. Since then, Mexico has posted strong growth, a glimpse of the nation's still untapped potential. Despite the drug-related violence, Mexico is set to attract $20 billion in foreign direct investment this year, matching last year's total. Two hot sectors are aerospace and cars. Mazda and its partner Sumitomo are spending $500 million on a new plant in central Mexico. Honda said this year it would spend $800 million to build its second Mexico plant. "Big investments aren't made on the basis of the 6 o'clock news," Bruno Ferrari, Mexico's economy minister, said in a recent interview. Mexico boasts low inflation and debt levels as well as a young work force. The country has become more competitive in recent years compared with rivals like China, thanks to a weaker peso, a slightly stronger Chinese yuan, rising Chinese labor costs and high transport costs. Mexico is now the world's second-biggest maker of flat-screen televisions and the fourth-biggest destination for outsourced information technology like call centers, according to the government. Many foreign companies have a more positive attitude toward Mexico than the locals, said Axa CEO Henri de Castries in an interview. "Mexico has an emerging middle class, a pool of private savings and an economy that's well managed." Mr. de Castries then added, with a laugh: "It's easier to run a company here than in France." Louise Goeser, the CEO of Siemens in Mexico, said her company was expecting to see its sales rise at three times the pace of economic growth through 2015, and recently located one of three global research and development centers in the central Mexican state of Queretaro. "This is an economy with great potential. Many parts of Mexico are far safer than parts of the U.S.," she said in an interview. "I've found personally and professionally that it's a great place to live." Big companies can often insulate themselves from the violence. Axa, for instance, won't insure certain types of cars, like big SUVs that are favored by drug gangs. The company also bars its employees from carrying cash around, and has taken down its corporate signs in northern states. "Violence is always a question for companies that want to move to Mexico, but rarely an impediment," said Rick Thompson, a managing director at consultancy CRG Partners who has helped locate some companies like appliance maker Electrolux to Mexico. For smaller Mexican companies in the north and central states like Michoacan, however, the violence has been debilitating. In Ciudad Juárez, across from El Paso, so many businesses have closed that the number of affiliated members in the local construction chamber of commerce fell from 250 to 50. The owner of a small printing business in Juarez says he has just one employee left after having a workforce of 24 just three years ago. His profits all vanish in payments to drug gangs. "It's like there are two economies here, one for the big guys, who can protect themselves from the gangs, and a totally different one for the little guy," he said.