To hear President Donald Trump tell it, El Paso, Texas, was one of the nation’s “most dangerous cities” before a border barrier was constructed. But the town sheriff is angrily blasting Trump’s “falsehoods” — and he’s backed by statistics, residents and other elected officials.

“It is sad to hear President Trump state falsehoods about El Paso in an attempt to justify the building of a 2,000-mile wall,” El Paso County Sheriff Richard Wiles, a Democrat, said in a statement about Trump’s slam in his State of the Union address. “El Paso was a safe city long before any wall was built.”

Other elected officials complained Trump’s lies are destructive to the city’s reputation and economy.

Rep. Veronica Escobar (D-Texas) on Thursday sent Trump a letter demanding an apology for politically motivated “distortions.”

“El Paso has never been one of the most dangerous cities in the country, and our safety and security has long been a point of pride,” Escobar wrote. “These distortions about our vibrant community are harmful to our reputation and degrade our spirit.”

Trump, in his State of the Union address on Tuesday, said that El Paso “used to have extremely high rates of violent crime — one of the highest in the entire country, and considered one of our nation’s most dangerous cities ... immediately upon its building, with a powerful barrier in place, El Paso is one of the safest cities in our country.”

That’s not true.

For the past 20 years, numerous ratings have listed El Paso as one of the nation’s safest cities, The Washington Post reported. Construction of the border barrier wasn’t begun until 2008. Snopes reports that in the 30 years ending in 2015, El Paso’s violent crime rate consistently fell “well below” rates in similar-sized cities, according to the FBI’s Uniformed Crime Reporting data.

The violent crime rate in El Paso peaked in 1993 (similar to many other U.S. cities), according to local and federal statistics analyzed by the El Paso Times. It fell by 34 percent from then to 2006. From two years before the wall was built to two years after, violent crime actually rose 17 percent, before returning to a downward trend.

Trump has been repeating the false claim since GOP Texas Attorney General Ken Paxton reportedly made a similar false statement to the president last month. Paxton has not produced data to support the comment.

Former Democratic Texas Rep. Beto O’Rourke, whose hometown is El Paso, complained to The Washington Post that Trump is “just full on, in the most racist terms, completely divorced from ... reality” concerning El Paso crime, and “uses this to incite fear and paranoia.”

Republican Jon Barela, chief executive of the Borderplex Alliance — a nonprofit economic development organization in the region — lashed Trump’s “damaging comments” that perpetuate the “myth that we are a dangerous and lawless frontier.”

“The fact of the matter is that El Paso and most of the cities on the U.S.-Mexico border boast among the safest crime statistics in the entire country,” Barela told the Post.

Trump plans to travel to El Paso Monday for a rally, where he’ll likely repeat the crime lie in a bid to whip up support for his promised border wall. The city’s Republican mayor, Dee Margo, said he’s looking forward to the president’s visit, but tweeted that El Paso was “NEVER one of the most dangerous cities” in the nation.

Trump won just 25.7 percent of the 2016 presidential vote in the liberal county, the worst performance on record for a major party presidential nominee in the region, according to the Post.