Updated

A man accused of shooting two police officers in the New York City subway said he would have kept firing had he not been shot by another officer, according to court documents released Thursday.

Raul Nunez was arraigned at his bed at Manhattan's Bellevue Hospital by a Queens judge on charges of attempted murder in the shooting during the Tuesday evening rush hour. He was being held without bail.

Officers Jason Maass and Shane Farina were wounded as they tried to arrest Nunez, who had illegally used a student MetroCard to enter a subway station in Queens, prosecutors said.

Nunez apparently used one of the officer's guns in the shooting.

"I saw the gun and I grabbed it and went wild," Nunez told investigators, according to a criminal complaint filed by Queens prosecutors. "I would have kept shooting but the other cop shot me and broke my leg. They started to put me in cuffs and I just grabbed the gun."

Defense attorney Kenneth Deane had no immediate comment.

Nunez said he found the subway pass on the train last week, and he struggled with the officers when they tried to arrest him, according to court papers.

"We fell down and I saw a silver gun on the ground," he said, according to the complaint. "I picked up the gun and shot the officer from about 2 feet away."

After fleeing to the upper level on an escalator, Nunez was confronted by Lt. Gary Abrahall, police said. He fired three more times before Abrahall fired six shots, hitting Nunez four times, they said.

Nunez, 32, is from the Dominican Republic and was deported in 1998 by an immigration judge after a drug arrest in New York. U.S. Immigration and Customs Enforcement agents say they're investigating how he got back into the country.

He reportedly told authorities he resisted because he was afraid he would be deported again if he was arrested.

Farina, who was shot near his sternum and suffered a fractured rib, remained in critical condition but was stable. Maass, who was shot in the lower back, was released early Wednesday from a hospital. Both officers were wearing bulletproof vests, police said.

Nunez was shot twice in the left leg and once in the torso and right leg. His condition wasn't immediately available Thursday.

Nunez could face 25 years to life in prison and deportation if convicted. He also faces a charge of re-entering the country after deportation, federal immigration officials said.