Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

As police departments across the country walk the line between enforcing the law and respecting the communities they serve, one town in New Hampshire is making more stops — to reward good behavior.

The Farmington, N.H., police department this winter began issuing gift cards for free pizza and fries to residents who use crosswalks, turn signals and otherwise obey laws that are easy to ignore.

Farmington Police Chief Jay Drury said he came up with the idea amid a stretch of particularly bad winter weather, after watching a man downtown make his way to a crosswalk despite heavy snow.

"I said to myself, that gentlemen deserves a medal for battling the snow that we've had and everything else," Drury, police chief for about six months, said in a recent interview.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

"And it was a couple of days later, and it kept weighing on me, and I thought to myself, I can't give him a medal but maybe I can do something else," Drury said. He teamed up with a local convenience store, Crowley’s Variety & Grill, to set up the program.

The project is a hit. An area credit union, Holy Rosary Credit Union, gave a $250 donation to Crowley’s to fund the program, and has promised to make more donations if it continues, Drury said.

As police departments across the country walk the fine line between enforcing the law and respecting the communities they serve, one town in New Hampshire is trying a different approach, by making more stops — ones that reward good behavior. NBC News

Farmington, located north of Rochester near the Maine border, is not free of crime. It only has a population of around 6,800, and there were 22 violent crimes in 2013, including seven rapes and 10 aggravated assaults, according to federal crime data. There were nearly 50 burglaries that year, and three cases of arson.

"We end up seeing 10 percent of the people 90 percent of the time. The same individuals over and over and over again," said Farmington Police Sgt. Brian Driscoll, who handed out gift certificates to surprised residents on a recent day. "So the gift cards help form connections. And build community trust," he said.

Driscoll stopped David and Tracy Menard after watching the pair use every crosswalk on a recent day. "I just want to thank you guys for doing the right thing and making my job a little easier," the sergeant explained.

"Well thank you for doing this, this is a really neat program," Tracy Menard said.

Drury isn’t quick to take much credit.

"There are way more people smarter than me, I just had a lucky idea that came from the heart and it seems to have taken a life of its own," he said.