BROOKLYN - A police officer who was shot in the line of duty in Brooklyn was released from the hospital today.

Police say that 18-year-old Elijah Foster-bey shot at three officers while trapped at the top of a stairway in a Bradford Street building in mid-October. Officer Richard Ramirez was hit twice in the right leg.

Ramirez was rushed to the hospital and had the bullets removed. He was then transferred to New York University Medical Center, where doctors rushed to save his leg.

Doctors say they were unsure up until this morning about whether or not Ramirez would be able to leave the hospital on foot or in a wheelchair. His doctor says that after a few weeks of therapy, Ramirez will be able to walk on his own again.

Foster-bey is charged with attempted murder of a police officer and was released on bail.

NYPD officer, suspect shot in East New York