LIVINGSTON, Mont. — The Yellowstone River, flowing in ribbons beneath the towering Absaroka mountains and through this small town, is usually flecked with drifting boats and rafts, sport fishermen and children jumping off bridges. But now the river, one of Montana’s premier fly-fishing destinations, is empty as wildlife officials and scientists race to contain the spread of a microscopic invader, a parasite that is deadly to fish.

Montana wildlife officials temporarily shut down almost 200 miles of the Yellowstone and its tributaries to recreation last week to prevent the parasite from spreading to other rivers, or south into Yellowstone National Park.

The white bodies of thousands of dead fish litter many parts of the river, victims of a parasite that causes a fatal illness called proliferative kidney disease, or P.K.D., in mountain whitefish. There have been reports that it is also killing trout, the prized game fish here. The outbreak has not spread to humans or other animals.