ROCKVILLE, Md. — An FBI agent and a state fire marshal were killed Friday while standing on the shoulder of a highway at the scene of a traffic crash, Maryland State Police said.

FBI Supervisory Special Agent Carlos Wolff, 36, and Deputy Chief State Fire Marshal Sander Cohen, 33, died when they were struck by a car as they waited for help after Wolff’s car crashed on Interstate 270 in Rockville.

Police said Cohen, deputy chief with the Maryland Fire Marshal’s Office, called state police at about 10 p.m. Friday and reported he had come upon the scene of a single-car crash in the fast lane of I-270 southbound. He asked for assistance, blocked the lane with his personal vehicle and activated his emergency flashers.

As Wolff — the driver of the damaged vehicle — stood with Cohen on the shoulder of the lane, a car swerved and struck both men. Both men were thrown over the jersey wall into the northbound side. Police said at least one was struck by a northbound vehicle.

Col. William Pallozzi, superintendent of the Maryland State Police, said Cohen had no idea Wolff was an FBI agent when he stopped to help him. “He stopped, he helped someone in need, and now he has joined the ranks of Maryland’s fallen heroes,” Pallozzi said.

Police said the driver of a Honda — apparently trying to avoid the stopped vehicles — swerved to the left but struck both men.

Cohen was pronounced dead the scene. Wolff was taken to Suburban Hospital, where he was pronounced dead.

Three other people were taken to area hospitals with injuries that were not life-threatening.

The cause of the initial crash involving Wolff’s vehicle remains under investigation.

Cohen was also a lieutenant with the Rockville Volunteer Fire Department.

Gordon Johnson, the special agent in charge of the FBI’s Field Office, said Wolff had worked for 11 years in the investigative division at the FBI’s headquarters in Washington, D.C.

“The loss will be felt by the entire FBI family, and our thoughts and prayers are with the Wolff family and friends,” Johnson said.