A Florida Highway Patrol trooper was shot and killed by a stranded motorist at a rest stop on Wednesday after he pulled over along Interstate 95 and tried to help.

Trooper Joseph Bullock, 42, died in the shooting about 10.15am near Palm City, about a 45-minute drive north of West Palm Beach, said Col Gene Spaulding, the agency's commander.

He said a passing police officer from Riviera Beach fatally shot the suspect, whose name has not been released.

Officials declined to say why the officer was in the area. City officials also declined comment.

Florida Highway Patrol trooper, Joseph Bullock (left and right), 42, was shot and killed on Wednesday by a stranded motorist

Col. Gene Spaulding (center) the director of the Florida Highway Patrol, said a passing police officer from Riviera Beach fatally shot the suspect, whose name has not been released

Spaulding said that Bullock had been with the shooter for several minutes before the shooting. A tarp is seen over the trooper's body near his patrol car

Bullock had stopped to help who he believed to be a stranded motorist around 10.15am.

Spaulding said that Bullock had been with the shooter for several minutes before the shooting.

Police, who are still investigating the shooting, said it's unclear why the suspect opened fire on Bullock.

According to WSVN, a news chopper flying over the scene captured tarps covering both of the bodies.

The deadly incident closed I-95 in both directions in the area. The interstate was reopened Wednesday night.

According to a statement from Florida Highway Patrol, Bullock was a US Air Force veteran who served nearly 19 years with the agency and was assigned to Troop L- Fort Pierce.

Bullock was a US Air Force veteran. He is survived by his parents and sister

Officers at the scene of the deadly shooting at mile marker 107 on I-95, about a 45-minute drive north of West Palm Beach

'Trooper Bullock was fatally wounded today in the line of duty while assisting the public on I-95 in Martin County,' according to the release.

'The investigation into the incident is ongoing and additional information will be released as it's available.'

Terry Rhodes, executive director of the Florida Highway Safety and Motor Vehicles, and Florida Highway Patrol Colonel Gene Spaulding put out a joint statement mourning the tragic loss of the trooper 'who chose to make selflessly serving and protecting others his life's work'.

The officials asked the public to keep Bullock's family and colleagues in their prayers.

Spaulding said Bullock is the 49th Florida trooper to die in the line of duty since the agency was founded 80 years ago.

Trooper Tracy Vickers had been the last, dying in a September traffic crash near Orlando.

'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,' Spaulding said.

According to Bullock's Facebook page, he lived in Stuart, Florida. He is survived by his parents, sister and several cousins.