For 40 years, Roberto Margo has been the only veterinarian in the border town of Rio Grande City, which not long ago had more cattle than people.

Dr. Margo enjoys his work. But there is enormous physical labor involved in a rural veterinarian’s duties, and he estimates he has palpated — or stuck his hand inside — thousands of cows to determine if they were pregnant.

“I finally tore up my shoulder muscles,” said Dr. Margo, 69, who has had shoulder, back and arm surgery and was found to have rheumatoid arthritis in 2008. “My body’s worn out, my shoulders are worn out, and I have arthritis and pain all over.”

These days he works mostly with small animals and hopes to retire soon. But until recently, he had no one to take over his practice. If he had retired, it could have threatened the livelihoods of his rancher clients, who would not have access to vital veterinary care for their cattle and horses.