An Old Orchard Beach man was killed early Sunday morning after he was ejected from his vehicle in a crash in Massachusetts.

Joshua Avery, 42, was driving a 2007 Mercury Mariner south on Route 495 in Tewksbury about 12:38 a.m. when he rolled over into the median and crashed, according to the Massachusetts State Police.

Avery, who wasn’t wearing a seatbelt, was ejected from the vehicle, the state police said Monday.

He was taken to Lowell General Hospital, where he died.

Speed is considered a potential factor, and the crash remains under investigation.

Tewksbury is east of Lowell.