But it wasn't long until a blogger for Forbes magazine reported that the meeting between the two was no accident: Spacey had been paid by the Mexican Tourism Board to attend the event - and appear with Pena Nieto. That's when some Mexicans took to social media to lambast both the actor and the president.
"How much did the selfie of Pena Nieto with Kevin Spacey cost?" asked the news portal sinembargo.mx in a headline about the photo.
Forbes blogger Dolia Estevez said the head of the tourism board, Rodolfo Lopez Negrete, denied in an email to her a news report that Spacey had been paid US$8 million (A$8.66 million) to attend the event, declaring the sum "wrong and without a source."
A day after Spacey sent the tweet, he tweeted again saying that in the photo, "I was in character as Francis Underwood in House of Cards! I don't know jack about Mexican politics. I should have made that more clear."
Mexican fans of Spacey took to his Facebook page Friday to voice their discontent with his choice of "selfie" pals.
"Shame on you. How could you sell yourself to such a corrupt and illiterate president?" wrote Cata Lina on the page Friday afternoon.
"How much did they pay you for taking that picture?" added Jacobo Ricardo Barocio Santos.