A motorist was killed Sunday evening in a two car crash on Route 9 in Loudoun County, the Virginia state police said.

A witness said the male motorist’s vehicle was traveling east when it swerved across the center line and hit a westbound vehicle near Route 287 north of Purcellville. .

The eastbound driver was “preoccupied with a handheld electronic device just moments before the crash,” police said, citing the account of a witness.

Police said the driver’s name was withheld pending the notification of relatives.

The two people in the other vehicle were identified by police as Anna M. Castro, 48, of Vienna, the driver, and Jose Castro-Rivas, 39, a passenger, also of Vienna.

Their injuries were considered life-threatening, the police said.

Police said the crash remained under investigation. The road was closed until about 10:45 p.m., police said.