An off-duty police detective failed a required sobriety test after wounding an armed suspect, leading a union official to suggest Tuesday that officers will think twice about stepping in when they're off the job.

The shooting early Sunday was the first time an officer failed a Breathalyzer test since a rule took effect last September. The test _ the same one used in drunken-driving stops _ is now administered to any officer who kills or wounds someone. Previously, a senior officer at the scene would determine whether those involved appeared sober at the time.

In this case, the detective's blood alcohol content was 0.09 percent, and the legal limit is 0.08 percent, authorities said Tuesday.

Police officials said the shooting appeared to be justified; a preliminary investigation showed the officer faced an imminent threat of serious physical injury or death. But it wasn't clear whether the detective would face disciplinary charges over the test results.

"The fact that alcohol may have been consumed off duty doesn't necessarily mean that a shooting was outside of department guidelines," said police spokesman Paul Browne.

The police union contends the new rule is excessive.

"Among its problems is that it fails to take real-life police situations into account," said Patrick Lynch, Patrolmen's Benevolent Association president. "It sends a message to off-duty officers not to get involved in crime-fighting and prevention. It can make them hesitate to use their weapons even when quick action is called for."

The longtime detective, whose name was not released, was placed on modified duty while the case is reviewed.

Police said he saw a man being attacked near a Queens club and stepped in to stop it. A suspect opened fire and missed; the detective fired back, hitting the man in the arm and leg.

The attackers fled, but the 22-year-old shooter was later arrested at a Long Island hospital where he went for treatment, police said. On Tuesday, he remained hospitalized and faced charges of attempted murder. Two others were also arrested and charged with gang assault.

The Breathalyzer rule stemmed from an NYPD review of undercover work after the police killing of an unarmed man on his wedding day. Police officials say it was intended to make operations as safe as possible, and some believe it will benefit officers by immediately ending speculation about an incident.

The union, which represents 23,000 officers, is challenging the rule in a federal lawsuit, arguing that it is flawed and violates officers' protection against unreasonable government searches.

Mayor Michael Bloomberg said that he would leave the decision to Police Commissioner Raymond Kelly, but that it appeared the detective did the right thing.

"He was off duty, he was enjoying himself _ he has a right to do that; off-duty police officers have the right to carry weapons. He, by accident, saw something where people's lives were threatened, and he took appropriate action to stop that," Bloomberg said.