Joe Biden slams Trump for 'dangerous' remarks during appearance in Mexico
Joe Biden addresses the press, at Los Pinos presidential residence, in Mexico City, on Feb. 25, 2016. (AFP/Ronaldo Schemidt)

Donald Trump's rhetoric about Mexico got a tongue-lashing Thursday, with US Vice President Joe Biden calling it "dangerous" and a Mexican ex-president dropping the F-bomb against his border wall plan.

Speaking during a visit to Mexico City, Biden told President Enrique Pena Nieto that there has been "a lot of damaging and incredibly inaccurate rhetoric" in the US election, but that most Americans do not share those views.

"I feel almost obliged to apologize for some of what my political colleagues have said about Mexico, about the Mexican people," he said.

While Biden did not identify any candidates by name, Trump has used the strongest words against Mexico's government and immigrants during the race for the Republican presidential nomination.

"It's a heated campaign season and I just want you to know, Mr. President, that the most heated of the rhetoric you've heard from some of the competitors for the nomination for president is not who we are as the American people," Biden said with Pena Nieto by his side, highlighting close cooperation on the drug war and $1.5 billion in daily trade.

At a separate meeting earlier in the day with members of Pena Nieto's cabinet, Biden said that "some of the rhetoric coming from some presidential candidates of the other team are I think dangerous, damaging and incredibly ill-advised."

"This too shall pass ... We have gone through these episodes of xenophobia but they have always been overcome," he said.

Trump has angered Mexico from the start of his candidacy by declaring that the country was sending rapists across the border and that he would force the neighboring government to pay for a giant wall to keep illegal migrants out.

"There are those who have the vision to close themselves off ... build walls, but this only means isolating oneself and ending up alone," Pena Nieto said, without naming the Republican frontrunner.

- Fox's F-bomb -

Vicente Fox, Mexico's president from 2000 to 2006, had harsher words, telling the US television network Fusion: "I am not going to pay for that fucking wall. He should pay for it. He's got the money."

The billionaire real estate mogul hit back on Twitter, writing: "Vicente Fox horribly used the F word when discussing the wall. He must apologize! If I did that there would be a uproar!"

Another former Mexican president, Felipe Calderon, also lashed out earlier this month, telling CNBC that the Mexican people "are not going to pay any single cent for such a stupid wall."

Last year, Pena Nieto's administration called Trump's comments about Mexicans "prejudiced and absurd."

The real estate mogul has also clashed with Pope Francis over the immigration issue after the pontiff, following a trip to Mexico this month, said that anyone who "only wants to build walls and not bridges is not a Christian."

Trump called Francis's comments "disgraceful" but he later softened his tone, saying he had a "lot of respect" for the first Latin American pope.

- Tough election issue -

Immigration is a hot-button issue in the US presidential race, which features two Republican candidates who are sons of Cuban immigrants: senators Marco Rubio and Ted Cruz.

Considered Trump's closest competitors, they have both taken a hard stance on the issue.

While Rubio backed immigration reform in 2013, he has since hardened his position and now competes with Cruz for support from conservatives demanding more deportations for the 11 million undocumented migrants in the United States.

Biden, who was in Mexico for economic talks, told Mexican officials that he hoped that President Barack Obama's immigration reform, blocked by Republicans in Congress, can still win approval.

Circumventing Congress, Obama announced measures in November 2014 to protect millions of illegal immigrants from deportation. The Supreme Court has agreed to review his executive order, after a lower court blocked it.

The candidates in the Democratic nomination race, Hillary Clinton and Bernie Sanders, have vowed to pass reforms to give undocumented immigrants a path to citizenship.

The Latino vote has become crucial in US elections as Hispanics are now the biggest minority group in the country, surpassing African-Americans.