SIMPSONVILLE, S.C. (AP) — A woman and her family lured her estranged husband to their home by offering to let him see his children, then beat him in the head with a hammer and fatally shot him as he tried to run away — a scheme concocted because they were upset about a child custody dispute, according to police in South Carolina.

The wife’s brother, Jacob Hughes, 29, started the plan in motion by inviting John Michael Ferrell, 51, for drinks at a bar Saturday night, and then offered to bring the man back to the house to see his children for the first time in a while, police said in news conference late Wednesday.

But not long after Ferrell entered the home, he was attacked with a hammer, police said. He tried to climb out a 6-foot high kitchen window, but either his pants snagged on a nail or people inside pulled them down trying to prevent him from escaping, police said.

“He was hindered by his pants that were down around his ankles, preventing him from fleeing, in addition to the trauma from being struck in the head multiple times with the hammer,” said Keith Grounsell, police chief in Simpsonville, a suburb of about 20,000 people just south of Greenville.

John Hughes, the wife’s father, then took aim with a .45-caliber handgun and fired at Ferrell, who was found dead 12 feet from the kitchen window, Grounsell said. Ferrell was hit five times, according to arrest warrants.

John Hughes, 57; his wife, Margaret Hughes, 55; their son, Jacob Hughes; their daughter and Ferrell’s estranged wife, Jane Hughes, 33; and her boyfriend Andrew Martin, 37, are all charged with murder. The suspects had requested public attorneys, but they hadn’t been assigned yet, police said Thursday.

Before his arrest, John Hughes told WYFF-TV that Ferrell was trying to break in through the window and that he feared for their lives.

“I killed my son-in-law. That’s horrible enough. But the fact I have to somehow tell my grandchildren that I killed their father — that might be more than I can take,” Hughes said.

Grounsell said forensic investigators found evidence of blood throughout the kitchen that was cleaned before police arrived Saturday night, and no one in the family mentioned any fight in that room.

No one answered a knock on the Hughes family’s door Thursday.

Dave Valente lives across the street from the Hughes’ home in a small subdivision with an entrance across the street from the Simpsonville Police Department.

Valente said he was at work the night of the shooting, but talked with his neighbor Sunday. He said John Hughes invited him in and told him Ferrell had been there earlier Saturday night and there was a heated argument. Hughes told Valente that Ferrell left three hours before the shooting but came back later. Hughes told his neighbor he shot Ferrell when the son-in-law tried to climb back in the house through the kitchen window.

“Obviously, he was B.S.ing me,” Valente said.

Police say less than 25 minutes elapsed between when Ferrell arrived at the house and the time police were called.

Valente has lived in the neighborhood for 19 years. He said the Hughes family started renting the house two years ago and seemed like great neighbors. The children frequently had picnics with their mom and her boyfriend in the front yard, he said.

WHNS-TV reported that it reviewed court records showing that Jane Hughes and Ferrell were going through a contentious divorce and child custody dispute.

Ferrell told officials that John Hughes told him taking his granddaughter would be the last thing he ever did. John Hughes told the court his son-in-law abused the children. A judge had issued a restraining order against the Hughes and Ferrell, according to WHNS-TV’s review of the records.

An Associated Press reporter attempted to view the records Thursday. However, in advance of a Friday emergency hearing in the case the records were sent to the office of Greenville County Family Court Judge Rochelle Contis.

A court official who refused to give her name said Contis left for the day during the lunch hour and the records were locked in her office and unavailable.