MEXICO CITY — On Mexican soil for the first time as the Republican presidential nominee, a firm but measured Donald Trump defended the right of the United States to build a massive border wall along its southern flank, standing up for the centerpiece of his immigration plan in a country where he is widely despised.
Trump, who previously derided Mexico as a source of rapists and criminals, praised Mexicans Wednesday as "amazing people" following a closed-door meeting at the official residence of the country's president, Enrique Pena Nieto. Trump and the Mexican president, who has compared the New York billionaire to Adolf Hitler, addressed reporters from adjacent lecterns before a Mexican flag.
The trip, 10 weeks before America's presidential Election Day, came just hours before the Republican nominee was to deliver a highly anticipated speech in Arizona about illegal immigration. That has been a defining issue of his presidential campaign, but also one on which he's appeared to waver in recent days
With political risks high for both men, Trump stayed on script, declining to repeat his promise to force Mexico to pay for a wall along the border between the two countries when pressed by reporters.
"Having a secure border is a sovereign right and mutually beneficial," he said, reading from prepared remarks. "We recognize and respect the right of any country to build a physical barrier or wall on any of its borders to stop the illegal movement of people, drugs and weapons. Cooperation toward achieving this shared objective — and it will be shared — of safety for all citizens is paramount to both the United States and to Mexico."
Trump's presence on Wednesday, his first meeting with a head of state abroad as a presidential candidate, sparked anger and protests across Mexico's capital city. A former Mexican president bluntly told the celebrity businessman that, despite Pena Nieto's hospitality, he was not welcome.
"We don't like him. We don't want him. We reject his visit," former President Vicente Fox told CNN, calling the trip a "political stunt."
Pena Nieto was less combative as he addressed reporters alongside Trump. He acknowledged the two men had differences and defended the contribution of Mexicans working in the United States, but he described the conversation as "open and constructive." He and Trump shook hands as the session ended.
After saying during his Republican primary campaign he would use a "deportation force" to expel all of the estimated 11 million people living in the United States illegally, Trump suggested last week he could soften that stance. But he still says he plans to build a huge wall — paid for by Mexico — along the two nations' border. He was under pressure to clarify just where he stands in the speech that had been rescheduled several times.
Trump's running mate, Indiana Gov. Mike Pence, told CBS earlier in the day that Trump would make clear "that there will be no path to legalization, no path to citizenship. People will need to leave the country to be able to obtain legal status or obtain citizenship."
The buildup to the speech was abruptly interrupted Tuesday night by the news that Trump would visit Mexico, accepting on short notice an invitation offered last week by Pena Nieto. The newspaper El Universal wrote in an editorial that Trump "caught Mexican diplomats off guard."
Campaigning in Ohio earlier in the day, Democrat Hillary Clinton jabbed at Trump's Mexican appearance as she promoted her own experience working with foreign leaders as the nation's chief diplomat.
"People have to get to know that they can count on you, that you won't say one thing one day and something totally different the next," she told the American Legion in Cincinnati. "And it certainly takes more than trying to make up for a year of insults and insinuations by dropping in on our neighbors for a few hours and then flying home again."
He has promised, if elected, to deport millions of immigrants who are in the United States illegally, force Mexico to build a wall to secure the nearly 2,000-mile border and renegotiate the NAFTA trade agreement to make it more favorable to the United States.
Pena Nieto suggested there was room to improve the trade deal, which Trump described as unfair to American workers. The New York businessman promised to promote trade deals that would keep jobs in the Western Hemisphere.
Pena Nieto made his invitation to both Trump and Clinton, who met with him in Mexico in 2014. The inclusion of Trump puzzled many in Mexico, who said it wasn't clear why their own unpopular president would agree to meet with someone so widely disliked in his country.
Pena Nieto has been sharply critical of Trump's immigration policies, particularly the Republican's plans to build a wall and have Mexico pay for it. In a March interview, he said that "there is no scenario" under which Mexico would do so and compared Trump's language to that of dictators Hitler and Benito Mussolini.
Pena Nieto did not repeat such criticism on Wednesday, but acknowledged Trump's comments had "hurt and affected Mexicans."
"The Mexicans deserve everyone's respect," he said.
Peoples reported from Washington. AP writers Mark Stevenson and Maria Verza in Mexico City and Jill Colvin in Phoenix contributed to this report.