President Obama speaks during a joint news conference with Mexico's President Enrique Pena Nieto in Mexico City on Thursday. / Dario Lopez-Mills, AP

by David Agren, Special for USA TODAY

by David Agren, Special for USA TODAY

MEXICO CITY - Past visits of U.S. presidents here would often be occasioned by demonstrations denouncing "the empire" to the north.

While leftism and anti-American attitudes are alive and well in segments of Mexico society, most notably in some unions and universities, its lure has faded as ordinary Mexicans increasingly see America as a friend rather than an oppressor.

"Anti-Americanism," said political analyst Fernando Dworak, was always "one of the great" political cornerstones of the Institutional Revolutionary Party (PRI), which ruled Mexico for seven decades.

President Obama arrived here Thursday to talk trade, security and immigration with President Enrique Peña Nieto in what his advisers say is a listening tour with the Mexican leader.

Obama said the U.S. will cooperate with Mexico in fighting drug-trafficking and organized crime in any way Mexico's government deems appropriate, and Peña Nieto emphasized that the security relationship must be expanded to focus on trade and commerce.

"I agreed to continue our close cooperation on security, even as the nature of that cooperation will evolve," Obama said. "It is obviously up to the Mexican people to determine their security structures and how it engages with other nations - including the United States."

Political analysts here say Obama will find that Peña Nieto is less enthusiastic about security and more interested in commerce, and that he heads a PRI that is less focused on ideology and more open to changes in labor laws as it tries to woo U.S. corporations away from China to create jobs in Mexico.

The PRI was stunned in 2000 when it was ousted from power by the conservative PAN party. It won the presidency back in 2012, but with a campaign in which Peña Nieto promised to loosen restrictions on business activity and tie Mexico more tightly to free trade with the United States, which buys approximately 80% of its exports.

As commerce between the two countries has come closer, so have attitudes towards Americans.

Political analysts say anti-yanqui pandering has fallen out of favor as the country has opened up trade-wise over the 20 years since the passage of the North American Free Trade Agreement or NAFTA, which eliminated many of the trade barriers between Mexico, the USA and Canada.

"There's a historic distrust," Dworak said, pointing to the Mexican-American war - when Mexico a lost a third of its territory - as the origin. But nowadays, "It doesn't move the masses."

Mexico and the United States have cooperated closely in recent years, especially on security matters. It's uncertain if that will continue as "the PRI has traditionally had misgivings about Uncle Sam's influence in its country," said George Grayson, Mexico expert at the College of William & Mary in Virginia.

"Every new Mexican president wants to diminish his country's dependence on the U.S," he said.

In Chilpancingo, south of Mexico City, violent protests were taking place against proposals to reform Mexico's education system so that teachers could be examined for competency and prohibited from selling their jobs to the highest bidder, as is currently allowed.

During the protests, an irate individual burst into a media scrum on the sidelines of a protest camp occupied by striking teachers to denounce "the empire," a shorthand here for the United States.

Many ordinary Mexicans show fewer misgivings about the United States.

Photographer Rodrigo Oropeza covered a protest by a left-leaning union outside the U.S. Embassy before Obama's arrival, but described it as "insignificant."

"Ten years ago, there would have been a mega-march" to welcome a U.S. president, he said.

This week, a national opinion survey of Mexico by the Pew Research Center was released that found 66% of Mexicans have a favorable opinion of the United States - up from 56% a year ago.

"We secretly admire the United States," said Alejandra Apreza, who manages a coffee shop in a neighborhood by the president's office.

Mexicans also like American brands, she said, mentioning Starbucks, which mushroomed in well-to-do-neighborhoods over the past 10 years, and Wal-Mart, now the country's largest retailer and employer.

Mexicans are also increasingly embracing the best of their own country, said physical therapist Anabel Nyssen. She points to the popularity of products such as mescal and tequila, spirits previously passed over for imported spirits by middle- and upper-class Mexicans. And there is the emergence of a world-renown culinary scene in Mexico City, which is heavy on local ingredients and traditions.

"People are rediscovering what Mexican is," Nyssen said.

Even as attitudes evolve towards all things American, many Mexicans see no reason for American intervention in the country, although many seem skeptical of their political leaders and institutions.

"They show us a face and behind it are private interests," Nyssen said of the president's plans for overhauling the state-run petroleum industry and structural reforms.

Some politicians try to take advantage of such suspicions by clinging to a nationalist discourse, including two-time left-wing presidential candidate Andrés Manuel López Obrador. He tours the country tirelessly accusing his opponents of selling out the country and campaign under the slogan, "The homeland is not for sale," but some political observers say he message - which hasn't been enough to win elections - resonates with many in the population due to past experiences with privatizations and reforms, not any sort fear of foreigners.

"(Mexicans) think that if you privatize something, something will get (unduly) rich," said Eduardo García, editor of the online financial publication Sentido Común. "(Mexico) created the world's wealthiest man (Carlos Slim) after it privatized the telephone company."

Just 21% of respondents in a poll published by the Excélsior newspaper said that a pact signed between Mexico's three big political parties to achieve structural reforms would benefit them. Others responded that Americans are being fooled by a wave of positive press coverage and pronouncement from pundits - often pertaining to proposed reforms - that the country is experiencing an economic boom. Mexico is still home to grinding poverty in many regions.

"Peña Nieto says the economy is good when (he's) in other countries," said David Ubilla, an electricity worker who was thrown out of work in 2010 when his notoriously inefficient utility was shut down by the government. "The reality is that the economy isn't doing so well."