An ASPCA agent accused of storming a Staten Island home while mugging for the cameras of an Animal Planet reality show acted legally, an appellate court has ruled.

The Feb. 27 majority ruling by Appellate Term Justices Michael Pesce and Michelle Weston Patterson overturned a lower court decision and clears the conduct of agent John De La Torre in the 2005 raid.

The decision also reinstates criminal animal cruelty charges against Kevin Lewis and Barry Delaney, two Port Richmond animal rescuers who had six dogs seized after De La Torre determined they were flea-infested and malnourished.

"This shows that agent De La Torre was acting in good faith and within the confines of the law," said ASPCA Assistant Director Joseph Pentangelo. "He was doing his job and the camera was merely documenting reality. He wasn't playing to it."

The footage never aired on the show, "Animal Precinct," which follows ASPCA officers throughout the city.

"Officer De La Torre, in an effort to play the starring role, acted in a manner to effectuate an arrest," wrote Sciarrino at the time.

But in their reversal, Pesce and Weston Patterson decided De La Torre followed proper procedure when he visited the pair acting on an anonymous tip and asked Delaney to bring the animals out for inspection.

"Delaney's voluntary bringing of the animals outside to be inspected by the police was the functional equivalent of his giving consent for the police to enter the house and inspect the animals," they wrote. The pair face up to two years behind bars if convicted of the misdemeanor charges.

A third appellate judge, James Golia, disagreed with the majority ruling and decided De La Torre was "determined to arrest" the pair for the benefit of the cameras.

Samuel Feldman, an attorney for Lewis, said the two are appealing the appeal.

"We think we have a very good shot at having this reversed back to the dismissal," said Feldman, arguing Delaney did not consent to the search. "They're animal rescuers. They devoted their lives to this."