Thousands of Minneapolis residents mixed with law enforcement and city leaders at National Night Out events around the city Tuesday night.

"[These gatherings] show compassion on their part," northeast Minneapolis resident Lisa Scheurer said of law enforcement.

The national celebrations encourage residents to interact with law enforcement in a festive setting to discuss crime prevention. Tuesday marked the city's 31st year of participation.

One of the community events, located on Nicollet Mall in downtown, included free games, merchandise and ice cream.

Mayor Betsy Hodges and Police Chief Janeé Harteau met with residents to discuss their concerns, while helping volunteers give away frozen treats.

"It was fun to hand out ice-cream bars versus traffic tickets," Harteau said.

An arcade-style basketball hoop was set up for participants, sparking a friendly one-on-one competition between Hodges and Harteau.

As Harteau racked up the points, an onlooker joked that the chief had rigged the game. Harteau responded: "The chief never cheats."

In the end, Harteau crushed Hodges, 25-9.

More than 80 Hennepin County sheriff's deputies and 81 teams of police officers attended events throughout the county on Tuesday, including specialty teams such as the equestrian and bomb-squad units.

"This is our time to go out and say 'thank you' to the community and to make sure that all lines of communication are open," said police spokesman John Elder.

Other residents saw the event as a way to strengthen relationships with police. Curtiss Brown, of Edina, echoed a thought of many in attendance: "We need more of these."

Each year, the Hennepin County Sheriff's office uses the event to promote a specific message. This year was focused on educating neighbors about the growing problem of heroin addiction by collecting expired or unused prescription medication.

Experts blame a large spike in overdoses here and nationwide on an influx of cheap heroin and widespread addictions to prescription drugs like OxyContin and Vicodin. Four out of five people who are addicted to heroin start as pain pill addicts who may have been prescribed the painkillers for a legitimate need, said Hennepin County Sheriff Rich Stanek.

Fifty-six people died due to heroin overdoses in 2013, compared to six in 2010, authorities say.

Doctors are wising up to drug addicts and quicker to cut off the supply of painkillers. "At some point, the doctor says 'enough is enough,' so people turn to heroin," Stanek said.

On Tuesday, more than seven boxes of prescription drugs were collected at a site in Plymouth.

He hopes the initiative will remove unused and expired medication from residents' cabinets and purses.

"We don't want them to be diverted for nefarious purposes," he said.

Matt McKinney contributed to this report.

Liz Sawyer • 612-673-4648