A Hudson police officer was almost shunted off the road when his vehicle was struck by a distracted driver last week.

The video — filmed from a dashcam on a Hudson Police Department squad car — shows the police car driving along when a white car fails to follow the road's curve and slams into the side of the car. The squad car attempted to swerve out of the way but failed to dodge the vehicle.

"Both the officer and the other driver are ok, however, this accident could have been much, much worse. So please remember to pay attention to your driving at all times when behind the wheel," said a Hudson police Facebook post accompanying the video.

The Minnesota Department of Public Safety estimates one in every four crashes occurs because of distracted or inattentive driving in the state. DPS officials believe the number to be much higher, but police face difficulty in determining after a crash whether a driver was distracted.

Ben Farniok is a University of Minnesota student on assignment for the Star Tribune.