When the governor of Colorado came to Mexico on a trade mission this year to see the sights, “one of the most amazing” was a Costco.

“It was as big, clean and modern as any in America,” recalled Gov. John Hickenlooper (D), who found the aisles filled with shoppers bearing “nothing but positive feelings toward the United States.”

Especially toward U.S. stuff.

The Costco was stocked with products stamped “Made in U.S.A.,” including some of the $755 million in goods that Colorado exports to Mexico each year: marbled slabs of steak from Greeley, cans of pinto beans from Holyoke and sacks of russet potatoes out of Monte Vista.

Trade between the United States and Mexico is surging, up 17 percent in 2011 to a record $461 billion, as Mexico vies with China to become America’s second-largest trading partner after Canada. China and the United States did $502 billion in trade last year.

The growing middle class that is fast becoming Mexico’s majority is buying more U.S. goods than ever, while turning Mexico into a more democratic, dynamic and prosperous American ally.

“We are obsessed with China when we ought to seriously focus, for our own benefit, on our neighbor Mexico,” said Robert Pastor, a professor of international relations at American University and author of “The North American Idea.”

While news about headless torsos, drug barons and illegal immigration dominates the headlines, and much of the Obama administration agenda south of the border has focused on law enforcement, economists say another story is one of roaring trade.

“Not only is Mexico doing better, macroeconomically speaking, than the false stereotypes would have us think, Mexico is actually doing better than the United States,” said Richard Fisher, president of the Federal Reserve Bank of Dallas, who applauds Mexico for controlling inflation, balancing budgets and managing debt.

Fisher grew up in Mexico City in the 1950s and remembers a Mexico that “was our soft underbelly, a country of tremendous poverty and horribly bad governments.”

Now Fisher and his peers praise Mexico for pouring billions of pesos into infrastructure, including ports, railroads, refineries and highways.

In the same breath, investors worry about everything Mexico still needs to do: enforce the rule of law, reduce poverty, bust wasteful telephone and media monopolies, open the national oil industry to foreign investment and curb endemic corruption, the kind that exposed Wal-Mart to allegations the company paid $24 million in bribes to speed permits for construction.

In the World Bank’s 2012 annual report “Doing Business,” which measures benchmarks such as enforcing contracts, paying taxes and protecting investors, Mexico finished a middling 53rd among 183 countries, an embarrassing rating for the pro-business government of outgoing President Felipe Calderon.

But the trend lines are up.

“The better off Mexico is, the better off we are,” Fisher said. “And all these Wal-Marts, Sam’s Clubs and Costcos are for the emerging middle class.”

‘Deeply integrated’

Trade with the United States has increased sixfold since the North American Free Trade Agreement went into effect in 1994, according to Bank of Mexico and U.S. Commerce Department data. The trade agreement eliminated tariffs for goods and made it easier to invest across the border.

In the United States, NAFTA is still often used as a pejorative shorthand for outsourced jobs, particularly in Rust Belt states where manufacturers have closed plants and moved south. The torrid expansion of auto manufacturing in Mexico, for instance, is viewed by some industry experts as a long-term threat to much-touted U.S. job growth in the sector.

But NAFTA today generates far less controversy in Mexico. The last large protests, by farmers angry about cheap corn imports from Canada and the United States, occurred in 2008.

During Mexico’s presidential campaign this year, none of the candidates — not even leftist challenger Andres Manuel Lopez Obrador — campaigned against NAFTA or threatened to revoke it. The winner, President-elect Enrique Peña Nieto, said he wants to expand it.

And there is little wonder why. Mexican exports to the United States have soared from $42 billion in 1993 to $263 billion in 2011, according to the Commerce Department. Almost 80 percent of Mexico’s exports go to the U.S. market, led by crude oil, fruits, vegetables, televisions, cellphones, computers and passenger vehicles.

“Before NAFTA, we had a slight trade deficit with the United States,” said Daniel Chiquiar, a Bank of Mexico statistician. “Now we have a huge trade surplus.”

U.S. exports have also multiplied, especially as the consumption tastes of the growing Mexican middle class increasingly resemble those of U.S. shoppers.

“Mexico and the United States are no longer competitors, where one country wins and the other loses. They are partners,” said Christopher Wilson of the Mexico Institute in Washington, who is the author of the report “Working Together.” “The Mexican and U.S. economies are now as deeply integrated as any on Earth.”

‘Looking for quality’

In a Costco store in the suburbs at the edge of Mexico City, shoppers browse shelves loaded with pallets of Kirkland vitamins, value packs of Nature Valley granola bars and sacks of Cape Cod kettle-cooked potato chips.

From 2009 to 2011, 825 new discounters and more than 3,000 convenience stores opened for business in Mexico. The biggest growth came in modern retail chains, filled with U.S. products, that are challenging, for better or worse, the traditional mom-and-pop stores doling out soda, eggs and tortillas.

Mexico bought $198 billion worth of U.S. goods last year, up from $41 billion in 1993.

The United States sold more stuff to Mexico than to Brazil, India, Japan and Britain combined.

At Costco, even the walls in the butcher aisle boast the “USDA Premium” and “USDA Choice” labels, in English.

Sales were up 12 percent last year at the company’s 32 stores in Mexico, according to Iñigo Astier, the executive in charge of purchasing for Costco’s Mexico operations.

“Costco members here in Mexico are middle class, even upper middle class,” he said. “As our economy grows, consumers are looking for quality products, and Costco is consistent in quality.”

About 6 million jobs in the United States depend on trade with Mexico, according to the consulting group Trade Partnership Worldwide, which calculated the total for the Mexican government in 2008.

More than 70 percent of the chickens Texas ships beyond its borders go to Mexico; New Jersey sends $1 billion in pharmaceuticals; Iowa exports $121 million in pork; Montana, $59 million in copper and molybdenum.

Preferring U.S.-made goods

In Mexico’s Costco stores, staples such as tortilla chips and chipotle salsa are trucked in from factories in California and Texas that produce for both sides of the border.

With 32 million people of Mexican descent living in the United States and extensive travel — and shopping — up north, Mexico’s middle class has come to equate American-made products with higher quality, even if the products costly slightly more.

“The Mexican consumer is less focused on price and more focused on freshness,” said Sonia Denham, a senior sales manager for California organic produce giant Earthbound Farms, which supplies Costco stores in Mexico and the United States.

“A salad produced or labeled in the U.S. is a more prestigious item,” said Denham, who explained that the “USDA organic” label is sought out by the discerning Mexican salad-eater.

Jim Walstrom, chief executive of Motely, Minn.-based Morey’s Seafood International, said his company’s relationship with Costco has opened doors to a vast market of 114 million Mexicans who will increasingly serve items such as Pacific salmon and mahi-mahi to their families.

“What we sell down there rivals what we can sell in any given store in the U.S.,” Walstrom said.

Working together

Many U.S. goods — metalworking machines, agricultural processors, car parts — are destined for the factory floors of Mexico, as the country grows as a manufacturing hub, helped by NAFTA and lower transportation costs and wages.

Trade analysts have watched Mexico move from farm work to assembly plants to the high-skill manufacturing necessary to make airplanes and satellites.

Earlier this year, China lost its factory-wage advantage over Mexico. Rising Chinese labor costs are pushing companies to “reshore” production back to Mexico and the United States, where transportation costs are lower, too.

This year, Mexico became the No. 1 investment destination for the aerospace industry.

More and more, Mexican and U.S. companies work together. Researchers say that an imported product from Mexico sold in the United States actually is 40 percent “Made in U.S.A.,” because of the sharing of parts and labor between neighbors. That same import from China to the United States is only 4 percent “Made in U.S.A.”

U.S. companies have been steadily increasing their investments in Mexico and have poured $145 billion into 18,000 companies since 2000. Their Mexican counterparts have not been idle.

Products selling under the brands Sara Lee, Thomas’ English muffins, Borden milk, Weight Watchers yogurt and Ready Mix concrete are actually wholly owned by Mexican companies.

This year, the Obama administration is expanding its Select USA initiative to Mexico, hoping to bring Mexican business leaders north for a visit, to tempt them to invest in America and place a bet north of the border.