The good news for EPN, if not for the PRI, is that he does not face re-election: Presidents in Mexico are constitutionally limited to a single six-year term. Nonetheless, he’s taking some political risks by welcoming Trump to Mexico City on Wednesday.

Peña Nieto has not minced words about Trump in the past, and like Trump, he has courted controversy. In fact, the president seems to have found the American candidate a useful punching-bag for improving his own standing. He has, unsurprisingly, said that Mexico will not pay for a wall along its border with the United States, even as Trump insists it will. (Trump likes to say that every time a Mexican official says this, he adds 10 feet to the wall’s height.) Peña Nieto also accused Trump of “xenophobic speech that reminds us (of the speech) of Hitler and Mussolini.” More recently, EPN has seemed to soft-pedal his remarks about Trump, though he has made the comparison to Hitler and Mussolini repeatedly over the last year.

The political calculus for Trump in visiting Mexico is tough to figure out, as Dan Drezner and Philip Bump both explain. For Peña Nieto there is perhaps a more obvious payoff, though also some substantial risks. By inviting Trump to Mexico, EPN could distract from his own troubles, and he might appear statesmanlike—having lured the great ogre Trump to visit Mexico and reckon with the country face-to-face, in a meeting where Peña Nieto will presumably once again solidly reject any prospect of Mexico paying for the wall. After news of the meeting broke last night, he tweeted, “I believe in dialogue to promote Mexico’s interests in the world and, principally, to protect Mexicans, wherever they might be.”

On the other hand, politicians much more well-versed with Trump than EPN have found themselves flummoxed by the Republican nominee. Who knows what Trump might do or say in the meeting, or report about it afterward? New York Times reporter Elizabeth Malkin reports that Mexicans were immediately outraged by the invitation, and she wondered how the Mexican president planned to counteract Trump’s spin. Her colleague Kirk Semple speculated that there could be large protests in Mexico City, and NBC and The Washington Post both reported that the U.S. Embassy had warned Trump’s campaign against making such a trip on short notice.

“This is appeasement of the worst kind. Peña Nieto is like [Neville] Chamberlain to his Hitler,” Alejandro Hope, a former Mexican intelligence official, told The Wall Street Journal. Fox, the former president, who has jousted in the media with Trump over the wall and other issues, blasted his successor. “He will even be considered like a traitor because we don’t accept to be offended. I think this is a big mistake on the part of President Peña,” Fox said.

Trump has said repeatedly that Mexican leaders are outsmarting American ones, and on Wednesday, Trump and Peña Nieto will engage in a battle of wits to see who fares better. The visit confirms an essential truth about politicians: Unpopular leaders will try all sorts of risky maneuvers to improve their standing.