The mayor of El Paso claims that President Trump referred to him as a “RINO” — aka “Republican in Name Only” — during his visit to the grieving Texas city last week after the Walmart shooting.

The condemnation allegedly came during a private meeting and stemmed from a disagreement the two had back in February over Trump’s proposed border wall.

“He said, ‘You’re a RINO,’ and I said, ‘No, sir. I am not a RINO,’ ” recalled Mayor Dee Margo in an interview for PBS’ “Frontline.”

“I said … ‘I simply corrected the misinformation you were given by [the Texas] attorney general, and that’s all I did,’ ” Margo explained.

The term RINO is typically used by Republicans to blast people within the party who do not always agree with conservatives. Margo and Trump had gotten into a dispute over the border wall following the president’s State of the Union address — in which he claimed El Paso saw a dip in crime after the installation of a border fence.

“Now, with a powerful barrier in place, El Paso is one of our safest cities,” Trump said.

Margo called the president’s assessment “wrong” and insisted that El Paso had been safe — “going back to 2005.”

“El Paso was NEVER one of the MOST dangerous cities in the US,” the mayor tweeted after Trump’s SOTU address. “We‘ve had a fence for 10 years and it has impacted illegal immigration and curbed criminal activity. It is NOT the sole deterrent. Law enforcement in our community continues to keep us safe.”

Trump fired back at Margo, saying he was “full of crap.”

“I don’t care if a mayor is a Republican or a Democrat,” Trump said. “They’re full of crap when they say it hasn’t made a big difference.”

Making light of the remark, Margo on Wednesday told PBS: “I’ve been to a proctologist and I’m doing much better.”