A gunman killed a Virginia Tech university police officer conducting a routine traffic stop Thursday, authorities said, and the body of another man—possibly the killer's—was found not far away, reviving painful memories of a 2007 massacre at the Blacksburg, Va., campus.

The four-year veteran of the Virginia Tech police force was killed around 12:30 p.m. when a man walked up and fired, said Bob Carpentieri, a spokesman for the Virginia State Police, which is leading the investigation. The suspect fled the scene, Mr. Carpentieri said at a news conference Thursday evening.

Authorities later found a second body and a weapon in a parking lot a quarter of a mile away, Mr. Carpentieri said. He declined to comment on whether the second body was the officer's killer or another victim.

A law-enforcement official who spoke on the condition of anonymity told the Associated Press the gunman was dead, but wouldn't say how he died.

The officer was identified as Deriek W. Crouse, a 39-year-old Army veteran and married father of five who joined the campus police force about six months after the 2007 massacre, the school said, according to the AP. He previously worked at a jail and a sheriff's department, the AP said.