LAREDO, Tex. — In this gun-friendly border city, where Tuesdays are “ladies’ nights” at the shooting range and pistols in hip holsters are a common sight, Representative Henry Cuellar is a proud defender of the Second Amendment, the lone House Democrat from Texas with an “A” rating from the National Rifle Association.

“This is not New York, this is Texas,” Mr. Cuellar said in an interview. “So you talk about guns, you talk about God, you talk about trucks.”

But times are beginning to change here in Texas, where a string of mass shootings in August left 29 people dead, and in Washington, where gun safety is now front and center on the congressional agenda.

Mr. Cuellar is emblematic of the shift. He voted this year for a House bill expanding background checks for gun buyers, which will almost certainly cost him his N.R.A. “A” rating and the campaign contributions and endorsement that went along with it.