LAS CRUCES, N.M. — On the edge of this parched southern New Mexico city, Phillip Arnold surveyed his rows of neatly pruned pecan trees with a satisfied smile.

“There was a time when I wondered what kind of mistake I had made,” said Mr. Arnold, who began helping his family grow pecans along the Rio Grande as a teenager in the 1960s. “But today, I feel real good about what we’re doing, and I feel good about the future.”

For months on end, the Southwest has been in the clutches of an unrelenting drought, one of the worst in New Mexico’s history. Earlier this month, the federal Agriculture Department declared six counties in the state as natural disaster areas because of the drought, including Doña Ana County, where Las Cruces sits.

While the lack of rainfall has left many ranchers and farmers reeling — and has earned the Rio Grande the nickname “Rio Sand” — pecan growers here have been able to thrive.