A murder suspect who escaped from a Mississippi jail was shot dead by a family he held hostage for several hours inside their home Thursday, police said.

After more than a week on the lam, Rafael Arnez McCloud was found dead in the bathtub of a home in Vicksburg, Mississippi, according to investigators.

The homeowner told police a man with a knife, later identified as McCloud, approached him around 4 a.m. Thursday as he and his 5-year-old son headed into the garage. The man forced his way into the home, according to the homeowner.

Hours later, the family used their own gun to fight back and escape.

Homeowner stabbed as he fought with suspect

A statement released by Vicksburg Police on Thursday evening gave details of the attack that ended with McCloud’s death.

“According to the homeowner,” police said, “he was bound in the bathroom by the suspect. The homeowner said he was able to free himself, fought with the suspect and sustained a stab wound to the back side of his shoulder.”

The man, his wife and his child were held in the bathroom, police said. The situation turned when the wife was allowed to leave the bathroom at some point, police said.

“The wife returned with a handgun and fired one shot believing to strike McCloud. After the husband’s bonds were cut by the wife, the husband took control of the weapon and fired additional shots striking McCloud,” police said. “The family then ran outside and flagged a motorist and asked them to call 911.”

When investigators arrived at the scene just after 7 a.m., they found McCloud in the tub with multiple gunshot wounds.

Suspect took jail employee hostage during escape

McCloud, 34, escaped last week after taking a jail employee hostage with a makeshift weapon, authorities have said.

Investigators warned they believed McCloud was armed and dangerous as they searched the area for him and offered a reward for his capture. Thursday morning they announced that the hunt for the fugitive had ended.

“This is certainly not the outcome that we wanted,” Warren County Sheriff Martin Pace said. “Our goal was to capture him safely and have him stand trial for the criminal charges he was in jail for. I am relieved that the family this morning was not injured more seriously than they were.”

The husband was being treated for his injuries, which were not life-threatening, Pace said. The wife and child were not injured, authorities said.

The experience was “very traumatic” for the family, Vicksburg Police Capt. Sandra Williams said, adding that exhausted investigators who had been searching for McCloud are happy the hunt has come to an end.

“There’s no telling how many lives were saved,” she said.

Charged with capital murder

McCloud had been in custody on charges in the killing of 69-year-old Sharon Wilson, whose body was found in an abandoned hospital in late June, according to the Vicksburg Police Department.

She had been hit in the head and beaten.

Investigators have said McCloud admitted to kidnapping Wilson from her home and dumping her body in the grass behind the hospital.

He was charged with capital murder, sexual battery, rape, arson, home invasion, weapon possession by a felon, grand larceny auto theft and burglary in connection with the slaying. He pleaded not guilty in January.