The decorated 74-year-old Vietnam War veteran accused of shooting seven South Carolina law enforcement officers had set an ambush for investigators coming to question his adult son about a child sexual assault, the sheriff investigating the case said Friday.

Frederick Hopkins was charged with murder and six counts of attempted murder Friday, Richland County Sheriff Leon Lott said. Hopkins had been in the hospital since he was taken into custody after the Wednesday afternoon shooting, but was taken to jail Friday, Lott said.

Florence County investigators called Hopkins' home and arranged to speak to his 28-year-old son, Seth Hopkins, about a sex assault investigation Wednesday afternoon, Lott said, adding that they had a search warrant. Officials had previously given the son's age as 27.

The three deputies were shot without warning as they got out of their car, he said.

Dozens of officers rushed to help, and the gunman shot four city of Florence officers. Police Sgt. Terrence Carraway was killed.

So many rounds were fired with such powerful weapons that it took up to 30 minutes to get an armored vehicle close enough to rescue the wounded officers, Florence Police Chief Allen Heidler said. The standoff lasted two hours.

Several children in the home were not harmed, authorities said.

Seth Hopkins was charged Friday with second-degree criminal sexual conduct. Authorities didn't immediately release details about the crime. Lott said Seth Hopkins also ended up in the hospital after the shooting but was released from hospital care and jailed Friday.

WBTW-TV reports Judge Tommy Mourounas denied bail for Frederick T. Hopkins, who needed help getting in and out of the courtroom and appeared dazed and tired.

Mourounas asked Hopkins "You understand where you're at right now?"

Hopkins responded, saying "No, where am I?"

The judge replied, "You're at bond hearing court."

The court did not decide whether to appoint him a lawyer, delaying that issue until his financial status can be verified.

The judge also denied bail for Seth Hopkins, who was not assigned a public defender.

Frederick Hopkins' wife, Cheryl Turner Hopkins, is an attorney and attended a hearing Friday that Solicitor Ed Clements said concerned emergency custody for children in the home. The solicitor did not provide details on the hearing and the Family Court judge sealed the case.

Cheryl Turner Hopkins told a WPDE-TV reporter outside the courtroom that she is sorry for the officers' families and asked for prayers.

Richland County deputies are investigating the case at the request of the Florence County Sheriff's Office.

Lott said a special FBI team that investigated the fatal shootings of five police officers in Dallas in 2016 and deaths of 59 people and wounding of hundreds more in Las Vegas last year is helping collect evidence from the crime scene at an upscale Florence subdivision.

"This is a large crime scene. This is a very large, complex puzzle that we are still filling the pieces in," Lott said.

Two of the wounded officers have been released from the hospital. Lott said others remain in critical condition but did not provide details.

Frederick Hopkins is a Vietnam veteran and a disbarred attorney. His U.S. Army records obtained by The Associated Press show he was awarded a marksman badge with pistol bar and a sharpshooter with rifle bar decorations during 11 years of service starting in 1966.

Hopkins also was awarded the Bronze Star for his heroism defending a firebase under attack by North Vietnamese forces on May 6, 1970.

Hopkins — then a U.S. Army captain — carried medical supplies across an open area, "braving shrapnel from exploding mortar rounds," according to the letter explaining the award. He was critically wounded when a mortar round exploded near him, the letter said.

Hopkins earned his law license after he left the military but was disbarred a few years later for mishandling money. Several of his Facebook posts in recent years were about guns, including celebrating his 70th birthday by repeatedly firing his M14 rifle "set up exactly like the one I used in Vietnam."

Authorities also released the names of all the wounded officers. Florence County Deputy Arie Davis, investigator Sarah Miller and investigator Farrah Turner were shot as they got to the home. Florence Police Officers Brian Hart, Travis Scott and Scott Williamson were wounded along with Carraway as they rushed to help.

Carraway's funeral is scheduled Monday at the city's civic center.

___

Associated Press researcher Monica Mathur in New York and reporters Meg Kinnard in Columbia, South Carolina, and Rebecca Santana in New Orleans contributed to this report.

___

This story has corrected the spelling of Farrah Turner's first name and the age of Seth Hopkins.