U.S. Republican presidential nominee Donald Trump will meet Mexican President Enrique Pena Nieto on Wednesday in a hastily arranged visit to Mexico hours before delivering a highly anticipated speech on how he will tackle illegal immigration.

True to Trump's flair for the dramatic, the visit will guarantee widespread news coverage for the New York businessman and former reality TV star. But it also takes him to a country where he is widely disliked because of strongly critical comments he has made during his White House campaign.

Republican vice presidential candidate Mike Pence, in several television interviews early Wednesday, said Trump would speak to the Mexican leader about border security, including his signature pledge to build a wall along the U.S.-Mexico border if he wins the Nov. 8 election.

The private meeting, which Trump and his advisers began considering last week after Pena Nieto's invitation, will be Trump's first official interaction with a foreign leader since he began his presidential campaign more than a year ago, stirring up frequent controversy both at home and abroad.

Pena Nieto has dismissed Trump's demand that Mexico pay for the proposed border wall and in March likened his tone to the ascent of dictators like Adolf Hitler and Benito Mussolini.

Trump's campaign manager, Kellyanne Conway, said the meeting would cover topics including illegal immigration, trade policy and drugs. Asked on NBC's "Today" show if he would speak to the Mexican president in the same blunt terms he has used at home, Conway said Trump would be "very presidential."

Trump was set to give a speech on immigration on Wednesday night in Arizona as he seeks to find a balance between maintaining the tough line on illegal immigration he took during the Republican primary contest, while giving moderate voters a reason to give him a fresh look.

Trump trails Democratic rival Hillary Clinton in most opinion polls nationally and in most battleground states with 10 weeks to go until the election.

Clinton was also invited to meet with Pena Nieto but it is unclear if she has accepted. Her spokeswoman took a dim view of Trump's trip.

"What ultimately matters is what Donald Trump says to voters in Arizona, not Mexico, and whether he remains committed to the splitting up of families and deportation of millions," spokeswoman Jennifer Palmieri said in a statement.

'DESPERATE MOVE'

Trump has been pilloried by Mexican media since he launched his White House campaign last year with a barrage of broadsides against the country, including saying that it sent rapists and drug dealers north across the border.

He has also pledged to renegotiate or scrap the 1994 North American Free Trade Agreement (NAFTA), a key trade deal between the United States, Mexico and Canada.

Former Mexican President Vicente Fox, who has been fiercely critical of Trump, on Wednesday blasted the visit, saying Trump was untrustworthy and that Pena Nieto's invitation appeared aimed at boosting his own flagging popularity at home.

Pena Nieto has been enmeshed in his own controversies, including over whether he plagiarized some of his 1991 undergraduate law thesis.

"It is a desperate move by both sides," Fox told CNN.

Trump shot back at Fox on Twitter for "railing against my visit."

Margarita Zavala, the wife of former Mexican President Felipe Calderon who has said she will seek the presidency in 2018, said in a tweet that Trump was unwelcome and that Mexicans repudiate hate speech.

Trump's last-minute trip contrasts with the usual style of foreign visits at the presidential level, which are long-planned and carefully scripted.

And foreign trips by White House hopefuls can be tricky to navigate. Mitt Romney, the 2012 Republican nominee, made a number of gaffes during a trip to London, Israel and Poland four years ago.

After the meeting, Trump was scheduled to speak at 6 p.m. MST (09:00 p.m. EDT on Thursday) in Phoenix, Arizona, a state at the heart of the debate over the porous U.S. border with Mexico.

Aides said he would reaffirm his determination to build a wall to curtail new illegal crossings and to quickly deport illegal immigrants who have committed crimes in the United States.

But the central question 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. That issue has bedeviled the immigration debate in the United States for years.

Trump has shown signs of indecision on whether to go ahead with his previous proposal for a "deportation force," saying there are some "great people" among the immigrant population and that he would like to work with them.

He was pressed in a Fox News interview last week on whether he was open to any steps that might accommodate law-abiding people who had built strong family ties in the United States.

"There certainly can be a softening because we're not looking to hurt people," Trump said in his response.

Such suggestions have prompted conservative allies like former Alaska Governor Sarah Palin to warn against rolling back on a central pledge that helped him defeat 16 rivals for the Republican presidential nomination.

But a more moderate immigration stance could help him attract more critical swing voters in his uphill drive to win in November.