That’s some ruff justice!

A teen mugger snatched a woman’s purse on a Queens street, but his getaway was foiled by two stray dogs that chased him down and mauled him in a park, police sources said.

But the German shepherd and pit bull were hardly treated like heroes — they were pepper-sprayed, clubbed and tranquilized by cops in order to rescue the perp before being carted off by city Animal Control workers.

The 15-year-old thief made his move when he saw the 56-year-old victim get off an MTA bus at Springfield Boulevard and 145th Avenue in Springfield Gardens and place her purse on a bench around 8 p.m. Tuesday, according to the sources.

The kid then allegedly grabbed the bag and took off into nearby Springfield Park, where he ran into the deputy dogs, who went into attack mode when they saw him running.

They easily caught the teen and bit him on his body and face.

By then, he was happy to see the cops, who pepper-sprayed and beat the dogs off him with batons.

The canines initially backed away but then went after the youth again.

The cops called in the NYPD’s Emergency Service Unit, which shot the animals with tranquilizer darts, the sources said.

“The dogs were still lingering, looking to get him. They were set up to continue their mauling,” a police source said.

The injured teen was rushed to Long Island Jewish Medical Center.

He was charged as a juvenile with petit larceny and released to his parents, police said.

Cops retrieved the victim’s purse and returned it to her. The woman declined to talk much about the incident when reached at her Rosedale home, saying only, “I’m only talking to the district attorney about this.”

The dogs were turned over to the Animal Care Centers of NYC in East Harlem, sources said.

Residents of the Queens community praised the dogs for thwarting the thief.

“People get robbed there all the time,” said a man who refused to give his name. “I hope they bit him in the ass.”

Additional reporting by Kevin Sheehan