A Florida Highway Patrol trooper was fatally shot Wednesday by a stranded motorist who was then killed by another officer, authorities said.

The shooting that killed Trooper Joseph Bullock, 42, happened around 10:15 a.m. near Palm City, located 45 minutes north of West Palm Beach.

The 19-year veteran had been with the suspect for several minutes alongside Interstate 95 before the shooting, said Col. Gene Spaulding, the highway patrol commander.

“People don't realize when you approach a car, even a disabled vehicle or a car on a traffic stop, you are worried about not only what is inside that car and what danger is waiting for you, you are also worried about the 80,000-pound tractor-trailers that are barreling down the highway behind you,” said Spaulding.

Authorities said the unnamed suspect was killed by a passing police officer from Riviera Beach, which is about 30 miles from Palm City. Officials declined to say what the officer was doing in the area.

CLICK HERE TO GET THE FOX NEWS APP

No other information about the shooting was released and the investigation is ongoing.

Spaulding said Bullock is the 49th Florida trooper to die in the line of duty in the agency's 80-year history. The last was Trooper Tracy Vickers, who was killed in a traffic crash in September near Orlando.

The Associated Press contributed to this report.