A shotgun-wielding man opened fire on a vehicle passing by his house in rural eastern Kentucky, wounding two people and later injuring three law enforcement officers in a shootout that ended when the gunman was fatally shot on his front porch.

"It was like Vietnam for a few minutes," said Breathitt County Sheriff Ray Clemons, whose department assisted Kentucky State Police after the gunman shot at the two travelers on a highway near his residence close to the Breathitt-Owsley county line.

Authorities took cover behind squad cars in the Sunday evening shootout.

The gunman, identified as Danny Johnson, 59, of the Houston, Ky., community, died of a gunshot wound, Coroner George Griffith said.

Authorities didn't know what sparked the shootout about a dozen miles west of Jackson, Ky., Clemons said.

"He'd shoot four or five times and quit, then start shooting again," the sheriff said in a telephone interview Monday. "They'd try to holler at him to get him to surrender and he'd fire up again."

Clemons said he didn't know the gunman, and said his office hadn't had problems with him before.

Two sheriff's deputies and a state police trooper were shot but didn't have life-threatening wounds, state police Trooper Tony Watts said.

Trooper Joey King was struck in the face with buckshot, he said. Deputy Marvin Reed was hit with buckshot in the shoulder, and Deputy Steve McIntosh was struck with buckshot in the arm and upper chest, Clemons said. Both deputies had minor injuries.

The two people in the vehicle also were hit with buckshot but weren't hurt seriously, Watts said.

Johnson's residence is about 30 yards from the road, Watts said. Johnson fired from inside the house and from the porch, Watts said.

State police said they were alerted at about 8:10 p.m. EDT Sunday that Johnson had fired shots from his house at the vehicle traveling on Route 30.

Authorities sent to the scene made contact with the gunman, asking him to talk to them and he responded by opening fire on them, Watts said. Officers fired back when the gunman refused to stop shooting at them, police said.

Police blockaded the stretch of highway to keep other motorists away from the residence. The standoff ended when Johnson was found shot on his porch, the sheriff said.

Watts said the investigation is continuing.