A Virginia police department has found a way to cool down drivers during a recent heat wave.

Police in Halifax County, Virginia, pulled over drivers as usual last week, but instead of handing out an expensive ticket, they handed out ice cream, WSET reported.

>> Read more trending stories  

Police captured one driver's response on video, posting it to Facebook, where it has gone viral with more than 6 million views.

Brian Warner, an officer who was seen handing out the cones, said police stopped about 20 people, giving them ice cream instead of tickets.

The department has only five officers.

Warner told WSET that police do surprises like this often, but it was the first time they've recorded it.