BROWNSVILLE, Tex. — The mayor of this Texas border city has been dealing with a crisis.

This week, he declared a state of emergency. Drones filled the skies and emergency vehicles raced down the streets. But none of it had anything to do with illegal immigration.

It had to do with the weather.

A severe thunderstorm caused widespread flooding throughout the Rio Grande Valley in recent days. That other crisis — the one President Trump says has been unfolding on the border because of illegal immigration — is largely a fiction, the mayor, Tony Martinez, and other Brownsville residents and leaders said.

“There is not a crisis in the city of Brownsville with regards to safety and security,” said Mr. Martinez, who has lived in Brownsville since the late 1970s. “There’s no gunfire. Most of the people that are migrating are from Central America. It’s not like they’re coming over here to try to take anybody’s job. They’re trying to just save their own lives. We’re doing fine, quite frankly.”

Mr. Martinez is a Democrat in a mainly conservative state, and many Republicans in Texas, like Mr. Trump, have raised an alarm over the numbers of migrants still flowing into Texas. But there is evidence, in federal data and on the ground in places like Brownsville that the immigration crisis Mr. Trump has cited over the past week to justify the separation of families is actually no crisis at all.