A group of NYPD cops surrounded a woman who’d been stopped by security for putting items in a bag at Union Square’s Whole Foods on Thursday — then paid for the goods, prompting the lady to break down in tears.

“I saw the woman opened up her bag, and one of the officers looked in the bag,” said documentary filmmaker Paul Bozymowski, who had gone to the store for cookout materials and witnessed the scene, later posting details and a photo on Twitter.

“And [the cop] said: ‘I’ll buy your food.’ Just really simply and plainly.”

Expecting a far worse outcome, the woman began to cry, the witness said.

“She was just overwhelmed with gratitude for these officers,” he said.

The officers eventually accompanied the woman to the customer-service counter and purchased the items for her, Bozymowski said.

The witness praised The Finest for their Fourth of July kindness on Twitter.

“I wasn’t surprised,” Bozymowski said. “I’ve lived in New York 25 years. It was just a really moving moment.”

The NYPD confirmed the incident and retweeted Bozymowski’s post, which racked up hundreds of likes and other retweets, with commenters commending the cops for their holiday gesture.

“Thank you NYPD,” one person wrote. “Sometimes the right thing is the compassionate move.”