Six vehicles piled up and two of them caught fire after a tractor-trailer rig jackknifed, killing four people, authorities said.

The truck jackknifed across an undivided highway Friday when its driver slammed on the brakes to stop for cars that had slowed behind someone turning left, Texas Department of Public Safety dispatcher Donnie Jimenez said.

Three students were killed when their car slid under the jackknifed truck. The DPS identified them as Edward King II, 18, Bryson Rashaad Thompson, 18, and Sarah Alexandra Nichols, 17. All were listed as students but their schools were not immediately known.

The other victim, Augustin Zermeno Hernandez, 32, was in a car that overturned and caught fire after being struck from behind by the jackknifed truck.

Two people were treated and released, Jimenez said.