COLUMBIA, S.C. — The gunman who killed five people, including a prominent doctor in South Carolina, was former NFL player Phillip Adams, who killed himself early Thursday, according to a source who was briefed on the investigation.

The source, who spoke on condition of anonymity because he wasn’t authorized to speak publicly, said Adams’ parents live near the doctor’s home in Rock Hill, and that he had been treated by the doctor. The source said Adams killed himself after midnight with a .45-caliber weapon. He was 32.

The York County Sheriff’s Office said they had searched for hours before finding the suspect in a nearby home.

Adams played in 78 NFL games over five seasons for six teams. A safety and special teams player from South Carolina State, he joined the 49ers in 2010 as a seventh-round draft pick.

Rarely a starter, Adams also played with New England, Seattle, Atlanta, Oakland and the New York Jets, finishing his career with the Falcons in 2015.

As a rookie late in the 2010 season, Adams suffered a severe ankle injury that required surgery that included several screws being inserted into the leg. He never played for the 49ers again, getting released just before the 2011 season began and signing with New England. Only in 2013 with the Raiders was he on a roster for a full season.

Dr. Robert Lesslie, 70, and his wife, Barbara Lesslie, 69, were pronounced dead at the scene, along with grandchildren Adah Lesslie, 9, and Noah Lesslie, 5, the York County coroner’s office said.

A man who had been working at the home, James Lewis, 38, from Gaston, was found shot to death outside, and a sixth person was hospitalized with “serious gunshot wounds,” York County Sheriff’s Office’s spokesperson Trent Faris said.

Faris said early Thursday that deputies were called around 4:45 p.m. Wednesday to the Lesslies’ home and spent hours searching for the suspect before finding him in a nearby home.

“We have found the person we believe is responsible and we are with him at this time, and that’s all I can say about the suspect,” Faris said, adding that they had no reason to believe anyone else was involved. “We are currently at his house and we are serving a search warrant.”

Later Thursday, a few sheriff’s deputies were posted near the Lesslie home, which is far beyond an arched stone gate, up a long paved driveway and not visible from the road. The Adams home, roughly a mile down the road, is a modest, one-story brick house; there were several cars in the driveway.

Lesslie had worked for decades as an emergency room physician in Rock Hill, board-certified in both emergency medicine and occupational medicine and serving as emergency department medical director for nearly 15 years at Rock Hill General Hospital, according to his website.

He founded two urgent care centers in the area and wrote a weekly medical column for The Charlotte Observer. He also wrote a book, “Angels in the ER,” collecting what he termed “inspiring true stories” from his time in the emergency department.

“I know without a doubt that life is fragile,” Lesslie wrote, according to an excerpt. “I have come to understand that humility may be the greatest virtue. And I am convinced we need to take the time to say the things we deeply feel to the people we deeply care about.”

Faris said Lesslie was very well known in the Rock Hill community.

“Dr. Lesslie was my doctor growing up,” Faris said. “Dr. Lesslie has been one of those people that everybody knows. He started Riverview Medical Center in Rock Hill and it’s been a staple in Rock Hill for years.”

A biography page said he and his wife raised four children, and that Lesslie received his degree at the Medical University of South Carolina.

Rock Hill is a city in northernmost South Carolina about 25 miles southwest of Charlotte, North Carolina.