This Virginia woman thought she was about to get a speeding ticket, but got something much sweeter from these two cops.

A one-minute video posted by Halifax police officer Kevin Lands to Facebook last Wednesday shows fellow officer Brian Warner approaching a Toyota sedan.

“Were you familiar with why I pulled you over today?” Warner asks the female driver.

She mumbles back, “No. I mean, no sir.”

Warner continues, asking her, “Are you familiar with vehicle code 1.7.3.9?”

When the woman shakes her head, the officer reveals that it’s not a real violation.

“It’s actually against the law to drive on a hot day without an ice cream cone,” he said, handing her a frozen treat.

The serious look on her face instantly melts away as she breaks into a fit of laughter.

“Oh my God!” she shrieks.

“We’re just making sure everyone is following all the laws today,” Warner said.

The woman was among the dozen or so drivers pranked by the cops last week.

Nearly 26,000 people have shared the post, which has over 4.2 million views, thanking the Virginia police officers for their dedication to the job.

“That’s so damn COOL! Lol!! Much respect for that!! #salute,” Aleko Mangum commented.

“What a wonderful way to show some love!! Way to go to Halifax, VA!!! Very proud!!” another commented.