A Reuters reporter asked Mexico's president at a Wednesday press conference about Donald Trump's plan to build a wall on the southern border of the US if he wins the presidency.
Trump, who is now the presumptive Republican nominee for president, has repeatedly called for a wall to prevent individuals from illegally crossing the border between Mexico and the US. He has also said that he would make Mexico pay for the wall.
See the president and his wife through the years:
"How worried are you that this time next year there will be a wall up on your border?" the reporter asked, at a press conference held at the North American Leaders' Summit in Ottawa, Canada.
President Barack Obama was at the press conference along with Mexican President Enrique Peña Nieto and Canadian Prime Minister Justin Trudeau, and he cut in to comment on the Trump question.
"I'm actually going to help out my friends a little bit on your last question even though it wasn't directed at me and just say, when I visit other countries it's not my job to comment on candidates in the middle of the race just because they may end up winning, and relationships between governments tend to transcend whoever is in power at any given time," Obama said.
"So, it's a tough question, I'm not saying they shouldn't answer it, I'm just helping them out a little bit."
Peña Nieto then addressed the question through implicit attacks on Trump's rhetoric.
"Those political actors, by using populism and demagoguery, they choose the easiest way to solve the challenges of today's world," Peña Nieto said. "And things are not that simplistic. It's not as easy as that to lead a country. To take on a responsibility to rule a country, it goes beyond giving the easiest answer. It is complex and it is difficult to lead a country."
Trump has made "the wall" a cornerstone of his campaign. He often mentions it at rallies, drawing huge cheers from crowds. Trump has also been accused of racism for saying early on in his campaign that Mexico is "sending people that have lots of problems" to America including rapists, drug runners, and other criminals.
Peña Nieto was also asked about his past comments comparing Trump's rhetoric to that of dictators.
"In the past, some leaders addressed their societies in those terms," Peña Nieto said. "Hitler and Mussolini did that. And the outcome, it's clear to everyone, it resulted in devastation and it turned out to be a tragedy to mankind."