LAMY, N.M. — For 18 years, Maryalice Garrigan has been taking the train from this wisp of a town near Santa Fe to visit her family in Albany, spending four days to reach New York via a connection in Chicago. She cherishes the annual ritual: Sipping the whiskey she packs in a cooler, and tracing the creeks and mesas that whiz by with a map she brings on each trip.

But now the historic route of the Southwest Chief, which runs between Los Angeles and Chicago, is in danger of being altered, a shift that would sever a practical and symbolic lifeline for Lamy and other struggling rural communities. People here and in other small towns along the train’s path say that if Amtrak leaves, Lamy — population 200 — will simply dry up and drift away across the high plains.

Amtrak, which has operated the Southwest Chief since 1971, has asked Colorado, Kansas and New Mexico to each pitch in $40 million over 20 years to help pay for track upgrades and maintenance it says are needed to keep the route viable. But some state officials are balking, saying that Amtrak, which draws financial support from the federal government, should cover the costs itself.

If no deal is reached by the end of the year, it could mean both an end to a storied railroad route — one that generations of Americans have used to travel across the West and glimpse the old frontier — and to the utility of places like Lamy, a longtime railroad junction where El Ortiz Hotel, built in 1896, was once a symbol of luxury.