The Department of Environmental Conservation (DEC) set a trap to capture a black bear that attacked a 46-year-old NYPD detective Sunday night in his home in Orange County, New York.

William Orange, a 19-year NYPD veteran assigned to the Department of Investigation squad, encountered the small black bear when he was walking back to his home off Mineral Springs Road in Cornwall at around 9.30 p.m. EDT after working on his wife’s car his garage, which was detached from the house. Orange said he heard a growl first, after which he saw the animal’s teeth and eyes in the dark.

So far, the bear has not been captured. If the DEC catches the bear, they will relocate it, reports said.

According to reports, the officer was keeping the household garbage in the garage as bears and other animals were attracted to the waste. Whenever Orange kept cans at the top of his garage, the animals always got to it.

“Maybe a cat, maybe a raccoon, but the last thing I expected to encounter was a bear in there,” he said. “That growl was really distinct.”

“I was walking back into the house, to grab something to eat,” Orange told CBS New York. “I didn’t see it.”

“It was pitch black in there,” he said. "I heard a growl and saw big teeth and something grabbed my shirt.”

The bear clawed at him, ripping through his shirt and scraped his skin close to his ribs. He was left with four long scratches on his chest and stomach.

“I put my arm out and pushed it away,” he said. “Once it got a hold of my shirt I just took a wild swing. … I hit it with my forearm and just ran.”

He was treated at his home by Cornwall Volunteer Ambulance Corp and then transported to St. Luke’s Hospital for further treatment.

Orange received a tetanus shot for the wounds which were superficial in nature, according to Daily News and had to take antibiotics as well. NBC New York claimed that he was left with “very deep scratches.” The officer will be able to rejoin work Thursday, reports said.

"I guess it could have been a lot worse. It got me, but it's more of a graze," said the father of three. "I'll be alright. If this were to happen, I am glad it happened to me and not my wife or my children.”

Orange said he will make sure his garage remains closed always. He is planning to keep all garbage outside, at a distance from the house.

Black Bear Attacks Off-Duty NYPD Officer An NYPD detective was attacked by a small black bear near his home in Orange County. In this image: A black bear grazes on grasses in Yellowstone National Park, Wyoming, June 18, 2013. Photo: Reuters/Jim Urquhart

"Although bear attacks are extremely rare in New York, residents are reminded to remove food sources for wild animals whenever possible and if trash is stored in a garage or outbuilding doors should be kept closed whenever possible," Cornwall police said.

“Actually screaming at the bear, yelling at the bear is effective, clinking rocks, hikers bring whistles,” Cornwall’s chief of police, Todd Hazard, said.