(CNN) -- It seemed innocent enough: two famous men running into each other at a public event by coincidence, exchanging pleasantries and small talk, and posing for a selfie later posted on Twitter.
But the meeting between "House of Cards" actor Kevin Spacey and Mexican President Enrique Peña Nieto this month in Cancún is at the center of a political controversy in Mexico that caught both the Hollywood star and Mexican government by surprise.
Spacey, who plays a president on the Netflix series, posted the selfie with the Mexican leader on May 7. "1 President is real. W/Pres Nieto in #Mexico. Good meeting a man also making progress in 1st year in office. @EPN" was the caption on Twitter.
The selfie was taken at Tianguis Turistico, an international tourism conference held in the beach resort of Cancún. Tour operators and tourism entrepreneurs and companies from around the world as well as Mexican officials and celebrities attend the event organized by the Mexican government.
The Mexican President also posted a picture with Spacey on his Twitter account, although it was a more formal, sit-down meeting, with the two men talking and looking at each other.
"It was nice to be with actor @KevinSpacey, special guest of #TianguisTuristico, last night in Cancun," Peña Nieto wrote on his Twitter account May 7.
"To fans of @HouseofCards, I'm sorry, I can't give away details of the third season," the President jokingly wrote later. He also retweeted Spacey's selfie.
Controversy erupted May 12 after Mexican columnist Salvador García Soto wrote in the 24 Horas newspaper that Spacey had been paid $8 million by the Mexican federal government. Political analysts immediately started questioning whether the meeting had truly been "a coincidence" or a shameless, self-promotional ploy by the President, paid for by Mexican taxpayers.
Spacey was the first to react to the storm of criticism in Mexico. "Story about Mex Gov paying 8m or any amount for selfie not true! Was In Mex for Tourist Board event. Meeting President not planned at all," Spacey tweeted May 16.
He had earlier tweeted that his endorsement of Peña Nieto was not necessarily personal. "I guess nobody got the joke. I was in character as Francis Underwood in House of Cards, not myself! I don't know jack about Mexican politics," Spacey said.
CNN reached out to Mexican officials for comment. In an e-mail, Rodolfo López Negrete, chief executive officer of the Mexico Tourism Board, said that Spacey was paid to appear at the tourism event but not to pose with the President.
"Kevin Spacey's participation at the Tianguis Turistico was part of the event's general program. The Tianguis is self-financed through the sale of booths and entry fees. We also have sponsors through which tourism service providers finance some costs," López Negrete wrote.
López Negrete didn't specify the amount Spacey was paid for his appearance but said the entire event had a cost of between 40 million and 45 million pesos (almost $3.1 million to $3.5 million).
This and other explanations have done little to silence criticism in Mexico. A reader of 24 Horas, the newspaper that originally reported the payment, cynically asked his fellow Mexicans to pay their taxes.
"Let's not stop in complying with our fiscal obligations," the reader wrote, "so that Peña the Clown can keep on paying his favorite actors. Imbecile. So many children on the streets and families without a job and he's spending Mexico's money in his (expletive) hobbies."