For some, it can be very easy to lose focus while driving on a perfectly straight stretch of highway. Fortunately, the driver of this semi-truck was swift to react when confronted with a scene that could have easily turned lethal.

The following near-miss occurred on Interstate 20 in the U.S. and was about as close as you’d ever want to get to an very serious accident.

Dashcam footage from the truck shows a grey sedan and a caravan traveling about 100 feet up the road. Unexpectedly, the caravan aggressively swerves into the left lane. The sedan following closely behind it then slams on the brakes and swerves towards the median, revealing a bundle of hay lying in the middle of the lane.

Without enough room to brake and avoid rear-ending the sedan, the driver of the semi-truck is forced to swerve into the median.

Fortunately, the median was equipped with cable barriers, and while tthose may not look as strong or rigid as more traditional steel or concrete ones, the cables were able to easily catch the semi before it rocketed into oncoming traffic in a scenario which would have probably have much more dire consequences.

As useful as cable barriers like these are, they’re not without drawbacks. In fact, many motorcyclists have safety concerns about them and claim they are more dangerous than concrete or steel ones. However, at least one study by the transportation authority in Alberta, Canada concluded that they aren’t any more dangerous than other types of barriers.