* Trump immigration proposals have stirred anger among Mexicans
* Trip will be second key time on world stage during campaign
* Mexico says Trump has agreed to meet its president in private (Adds Mexican reaction to meeting)
By Steve Holland
WASHINGTON, Aug 30 (Reuters) - U.S. Republican presidential nominee Donald Trump said he will meet Mexico's president on Wednesday, hours before he sets out proposals to crack down on illegal immigration that have stirred up widespread anger among Mexicans.
The hastily arranged trip will be Trump's second significant appearance on the world stage during his presidential campaign. A June visit to his golf courses in Scotland was dominated by his reaction to Britain's vote to leave the European Union.
The meeting with President Enrique Pena Nieto looked to be the type of dramatic, Trump-style event to ensure he dominates the headlines as he tries to close a gap in national opinion polls that now favors his opponent, Democrat Hillary Clinton.
"I have accepted the invitation of President Enrique Pena Nieto, of Mexico, and look very much forward to meeting him tomorrow," Trump said on social network Twitter on Tuesday.
The Mexican government, which has bristled at Trump's threats to wall off Mexico and tear up the North American Free Trade Agreement, also confirmed the meeting in a tweet, saying Trump had agreed to meet Pena Nieto in private. Nieto later tweeted about the meeting, then added:
"I believe in dialogue to promote Mexico's interests in the world, and chiefly, to protect Mexicans wherever they are."
Trump has been pilloried by media in Mexico since he launched his presidential campaign last year with a barrage of broadsides against the country, saying it sent rapists and drug dealers north across the border.
The meeting appeared to be a gamble by Pena Nieto, whose popularity has slumped to all-time lows, and opposition politicians reacted with dismay.
"Be part of the campaign of a candidate dedicated to insulting us? Why?" said former interior minister Alejandro Poire, retweeting #TrumpNotWelcome hashtags on Twitter.
BORDER WALL
Trump has said, if elected on Nov. 8, he would carry out his pledge to build a wall along the U.S. southern border with Mexico to prevent illegal crossings into the United States.
He has steadfastly demanded that Mexico pay for the wall, a position Trump supporters cheer but which Mexican officials scoff at.
Talks between the Trump campaign and the Mexican government on the trip began after Trump decided last weekend to take up Pena Nieto on an offer to meet, a source familiar with the situation said.
Trump is expected to meet the Mexican leader in Mexico in between fundraising events he has scheduled in California and his immigration speech in Phoenix, Arizona, on Wednesday night.
Pena Nieto has publicly voiced skepticism about Trump.
At a June 29 news conference with U.S. President Barack Obama and Canadian Prime Minister Justin Trudeau in Ottawa, Pena Nieto warned of the dangers of populism in a globalized world and defended comments likening Trump to Adolf Hitler and Benito Mussolini.
"Hitler, Mussolini, we all know the result," he said, when asked to explain the comparison. "It was only a call for reflection and for recognition, so that we bear in mind what we have achieved and the great deal still to achieve."
In his Arizona speech, Trump will detail where he stands on illegal immigration after worrying some conservative allies when he said last week he was "softening" his position on mass deportations.
Trump aides said he would reaffirm his determination to build the border wall to cut new illegal crossings and quickly deport illegal immigrants who have committed crimes in the United States.
However, the central question facing Trump was how he would treat the majority of the 11 million illegal immigrants who have set down roots in their communities and obeyed U.S. laws, an issue that bedevils the immigration debate.