When a woman was accused of shoplifting at a Whole Foods in New York City on Thursday, supermarket security officers detained her while they called police. But instead of arresting the woman, the three police officers paid for the food she allegedly slipped into her shopping bag.

Officers with the New York Police Department were already inside the Whole Foods location, in the process of buying something for lunch. When they noticed the commotion, the officers assessed the situation and saw fit to help out the woman.

Their deed, as well as the woman breaking into tears, was captured in a photo that was shot by a customer who described himself as heartened by the unexpected gesture.

POLICE COME TO THE RESCUE AFTER BOY WITH AUTISM CALLS 911 TO REPORT LOST TEDDY BEAR

"It was a nice moment for, you know, people, it was compassionate and the woman obviously was really grateful," said customer Paul Bozymowski, according to ABC 11.

NYPD Chief Terence Monahan later took the opportunity to praise his men.

“Cops like Lt. Sojo and Officers Cuevas and Rivera of the Strategic Response Group are the kind-hearted cops who quietly do good deeds for New Yorkers in need,” the chief tweeted. “My thanks to @pboz for highlighting the often unnoticed.”

The chief later noted that, on the same day, other officers had helped save a baby who stopped breathing.

It was a way to remind everyone, the chief said, that such actions are frequent – and unsung – parts of a police officer’s day.

“From saving a baby to securing the @Macys fireworks, NY’s Finest do it all,” the chief tweeted. “Sgt Chandu & Officers Grennan, Keegan, Rahilly & Losquadro had just arrived in Manhattan when they were flagged down by parents whose baby stopped breathing. These hero cops went to work & saved her life! “