A motive for the shooting was unclear, but Douglas Barfield Jr., a spokesman for the sheriff’s office, said on Saturday afternoon that the shooting had been the result of a local conflict.

“We don’t think this was a situation where a random person armed himself and went into a randomly selected location and shot a bunch of unknown people,” Mr. Barfield said.

In a news conference, Sheriff Faile declined to discuss the nature of the dispute but said that one of those killed had been involved in the conflict, which had been going on for a couple of months.

Neither the victim involved in the dispute nor the person officials were seeking as the gunman were legally allowed to have guns, Sheriff Faile said.

“They are federally prohibited from previous convictions,” he said without elaborating.

In a statement, Karla Knight Deese, the Lancaster County coroner, identified the fatal shooting victims as Henry Lee Colvin, 29, of Rock Hill, S.C., and Aaron Harris, 28, of Kershaw, S.C. It was not clear which of the two men had been involved in the dispute.