The man who shot a Suffolk County police officer in Huntington Station is a known gang member and he fired four shots at the highly decorated officer because he told authorities he didn't want to get caught with a gun, officials said Thursday.

Sheldon Leftenant, 22, of Mastic Beach, shot Officer Mark Collins, who was airlifted to the hospital and is expected to survive, during a confrontation after a traffic stop just before midnight Wednesday, police said.

The 12-year veteran of the force, assigned to the Second Precinct, was shot twice in the neck and hip, Police Commissioner Edward Webber said at an early-morning hospital news conference with County Executive Steve Bellone.

StoryCop hurt in shooting hailed as 'hero' StoryDA: Accused cop shooter in 'vicious' gangPhotosRecent LI mug shots

Collins, 35, who had been placed in an induced coma, was conscious and responsive Thursday night at Stony Brook University Hospital, police said.

"He is a hero," Webber said, "and we are thankful that his injuries, though serious, are not worse."

Leftenant, who pleaded not guilty to attempted aggravated murder and resisting arrest, faces 40 years to life in prison if convicted, prosecutors said. He was ordered held without bail at his arraignment Thursday afternoon in First District Court in Central Islip. More than 100 police officers flooded the courtroom to show support for Collins.

advertisement | advertise on newsday

Leftenant's attorney, Ian Fitzgerald of Central Islip, said his client maintains his innocence.

Collins was in an unmarked car with two colleagues from the gang unit when they stopped a vehicle that was speeding and "swerving in and out of traffic" with four occupants near East Jericho Turnpike and Mercer Court, District Attorney Thomas Spota said during a news briefing after the arraignment.

Leftenant, a backseat passenger in the car, was "nervous" and "fidgety," Spota said. Leftenant took off running onto Mercer Court, a residential street, and Collins and Officer Damian Torres gave chase, Spota said.

Collins and the other officers recognized Leftenant and two others in the car as members of the "local vicious gang called The Tip Top Boyz," Spota said.

Collins "attempted to arrest" Leftenant on Mercer Court, Spota said. Leftenant fired four times at Collins, hitting him twice, prosecutors said. Collins believed he had used his stun gun on Leftenant, Spota said. Collins did not fire his handgun, Spota said. It's unclear whether Collins was wearing his bulletproof vest.

Collins, was "bleeding profusely from the neck," after the shooting but was "alert" and told Torres: "Sheldon Leftenant shot me."

The shooting set off an intense search. A police dog led officers to a shed in a backyard on East 25th Street, a block from Mercer Court.

Leftenant refused commands to come out and, when officers tried to arrest him, he kept his hands over his stomach instead of behind his back, according to a complaint. A .38-caliber handgun, believed to be the one used in the shooting, was found in a nearby yard, the district attorney said. He was arrested about 1 a.m. Thursday, police said.

Leftenant later told police that he shot the officer to avoid being caught with a gun, according to the complaint. "I didn't want to get caught with a gun on me, so I ran. I had to do what I had to do. You know. I just wanted to get away," the complaint says.

Leftenant was himself the victim of what Spota said is believed to be a gang-related shooting on Aug. 6 in front of his then-Tippin Drive home in Huntington Station. The bullet struck Leftenant in the groin, police said, and he was treated for nonlife-threatening injuries.

advertisement | advertise on newsday

No arrests have been made in that drive-by shooting, police said Thursday. Spota said the shooting is unsolved principally because Leftenant "absolutely refused to cooperate with law enforcement."

A man at the Tippin Drive home who identified himself as Leftenant's older brother but wouldn't give his name, said of the latest allegations: "I don't think that's true."

Collins, who is married with no children, won Second Precinct Officer of the Year in 2008 "for a drugs and weapon arrest he made with another officer during a traffic stop in Huntington Station the year before" and he was awarded a bravery gold medal for helping save a man's life during a 2008 house fire in the community, police said.

Stony Brook's chief of trauma surgery, Dr. James Vosswinkel, said Collins has a "very favorable prognosis" for recovery.

In the officer's North Bellmore neighborhood, Collins was described as a selfless neighbor. Dr. Yale Rosen, 79, a pathologist, recalled how Collins came to his rescue when he fell down his basement steps three years ago. Rosen said his wife called 911.

advertisement | advertise on newsday

"Somehow, he showed up," Rosen said.

In an email Thursday night, Suffolk police Insp. Edward Brady, commanding officer of the Second Precinct, said the department is "incredibly grateful" for Collins' "very good" prognosis.

Brady said the precinct's "Huntington Station Violence Initiative," which was created in July 2014, has resulted in 724 arrests with 91 of those arrested confirmed as gang members.

"Rest assured we will continue our effective crime fighting strategies on behalf of all residents in our community," he wrote in the email.