BRENTWOOD — Two people died late Wednesday night when two cars on Highway 4 collided head-on, the California Highway Patrol said.

The wreck involved one electric vehicle that caught on fire after the crash, according to the California Highway Patrol. That car was in a ditch when first responders arrived, Contra Costa Fire Protection District Battalion Chief Jeff Burris said.

The crash closed down the eastbound lanes of the highway overnight for about seven hours. The lanes reopened about 5:30 a.m. Thursday, according to the CHP.

Authorities said the drivers of the two cars were the ones who died in the crash. Authorities did not immediately identify them.

CHP officers were called to the scene about 10:20 p.m. Investigators have not determined what caused the crash.

Burris said that the electric vehicle operated on a lithium battery that spewed hydrogen fluoride with the smoke. That chemical can be particularly harmful, according to Burris, and fire crews were forced to let the fire burn itself out.

A hazardous materials team from Contra Costa County also responded to the scene.