Two people were killed and a third person was critically injured early Sunday when their car burst into flames following a crash on the 680 Freeway in Dublin, authorities said.

The 3:30 a.m. crash occurred shortly after a Volkswagen Jetta headed south on the freeway north of Alcosta Boulevard went off the right side of the road for unknown reasons, swerved back into lanes and hit the center median wall, California Highway Patrol (CHP) Officer Tyler Hahn said.

The car came to rest sideways, blocking the left lane. A Ford Fiesta also going south crashed into the Jetta.

"The Jetta became fully engulfed with fire, and two occupants who were trapped in the vehicle died," Hahn said.

CHP officers could see the fire as they headed to the crash, officers said.

The third person in the Jetta was taken to John Muir Health Medical Center in Walnut Creek. The victim's injuries were described as major.

The Fiesta's driver went to the same hospital with injuries described as moderate.

None of the victims' names were immediately released.

CHP officers closed the freeway until nearly 5 a.m., when the right two lanes reopened.

The CHP asked anyone who witnessed the crash to call the Dublin office at 925-828-0466.