Three people were shot to death at a Texas nursing home on Friday night and two others were found dead at a nearby residence, in what the authorities said were related episodes.

The police in Robstown, Tex., about 20 miles west of Corpus Christi, responded to an “active shooting” at the Retama Manor Nursing Center about 7 p.m. on Friday.

Three people were found dead at the nursing home, and the killer was among the dead, said Herman Rodriguez, a spokesman for the city. Officials did not specifically say how the killer had died, though they said the threat at the nursing home had been “neutralized” by the time officers arrived.

“We are looking at a murder investigation,” Chief Erasmo Flores of the Robstown Police Department said in a statement.