The Jouflas, from Greece, ran sheep in the Vail Valley, which would become a skiing, rafting, hiking and biking mecca. The Aldasoro brothers, a pair of entrepreneurial siblings from the Basque region, invested in real estate and tourism around Telluride, a one-time mining camp wedged between steep mountains that evolved to attract Hollywood royalty and affluent skiers.

“Some of these families now have entire fiefdoms,” said Andrew Gulliford, author of “The Woolly West.” “They have become well-heeled landed gentry, exactly in remote parts of the American West on land nobody wanted.”

Some, like the Inda family, kept raising sheep. But with a dearth of Americans keen to be herders, ranchers in the 1980s began to recruit workers from Mexico and then South America.

Mr. Mendoza, whose family in Peru owned a few milk cows, sheep and mules, first heard about the sheepherding opportunity from a friend. He traveled to the U.S. embassy in Lima, where he watched a video about being a sheepherder, or borreguero.

He signed his first contract in 2014, sending money to his mother and three children, enabling them to get the schooling that he never got. In the winters, when he is not alone in the mountains, he helps tend to sheep on the Inda family ranch.

He speaks with his family about once a week, depending on whether he can get reception for his cellphone, which he charges with a solar-powered battery. He said that he missed them, and that he longed for papaya, pineapple and quinoa, a Peruvian staple.