A West Virginia man accused of fatally shooting three co-workers at a western Maryland machine shop remained under police guard at a hospital Friday, but authorities said a Maryland state trooper injured in a shootout with the suspect was treated and released.

The 25-year veteran of the Maryland State Police was shot when police said the fleeing suspect fired multiple rounds at troopers who tracked him down in western Maryland. At least one trooper returned fire, striking the suspect, state police said. The injured trooper and suspect were both taken to a hospital.

The trooper has been released, but the suspect remained under police guard while undergoing treatment, police said late Thursday. Charges are pending consultation with the Washington County State’s Attorney’s Office, police said. The troopers involved in the shooting will be placed on administrative duty while an investigation is conducted.

Washington County Sheriff Doug Mullendore said three men were found dead at Columbia Machine Inc. in Smithsburg on Thursday afternoon and a fourth was critically injured. The victims and suspect were all employees at the facility, he said. The sheriff identified those killed in the shooting as Mark Alan Frey, 50; Charles Edward Minnick Jr., 31; and Joshua Robert Wallace, 30.

Reached by telephone Friday, Nelson Michael, the father of Brandon Michael, 42, who was wounded in the machine shop shooting, said his son was still in the hospital, but he didn’t know more about his condition.

“He’s surviving,” he said. “I’m glad he’s alive, but it’s going to work on his nerves. I know that.”

Nelson Michael said he didn’t know why the gunman shot the victims.

“I’m not saying any more. I’m just glad my son’s alive, and I feel so bad for the families of the other ones,” he said.

The shooting suspect was identified as a 23-year-old man who lives in West Virginia, but the sheriff’s office said his name wouldn’t be released until charging documents are filed. Authorities declined to release a motive.

Mullendore said the suspect used a semiautomatic handgun, which was recovered after the shootout.

Messages left seeking comment from the company weren’t immediately returned.

Smithsburg, a community of nearly 3,000 people, is just west of the Camp David presidential retreat and about 75 miles (120 kilometers) northwest of Baltimore. The manufacturing facility was in a sparsely populated area northeast of the town’s center with a church, several businesses and farmland nearby.