“Wow! What a candidate! What a man! Beto, you are fantastic,” Fox said in a video posted to Twitter. “You’re great! You’re an all-American.”

With just a few weeks left before the midterm elections, O’Rourke is in a tight race with Republican Sen. Ted Cruz.

Fox, who served as Mexico’s president from 2000 to 2006, has openly voiced his discontent for Trump and his immigration policies – including the hotly debated wall along the southern border.

“I’ve been an opponent and resistant (of Trump) because I feel as part of this nation — I am part of this nation — and I don’t like what I’m seeing,” Fox said during a speech at Northwestern University on Tuesday night, according to the Chicago Tribune.

The former Mexican president praised O’Rourke as compassionate and intelligent who understands Americans, “but you also understand we are human beings.”

“You are the enlightenment for Texas and I hope every single Mexican, Latin, every Hispanic in that great state of Texas is going to vote for you,” Fox said. “You deserve it because you are going to respond to the hope and expectations of Texas, understanding what they need and understanding what America needs.”

O’Rourke has some catching-up to do if he hopes to be the first Democratic Senator in Texas since 1993.

A CNN poll released this week shows Cruz with a 7 percent edge over his Democratic challenger among likely voters, with only 9 percent of Texas voters saying they could change their mind about who to support.