NEW YORK (CBSNewYork) — Police have charged a suspect in connection with the shooting of an NYPD sergeant last month in Queens.

John Thomas, 24, has been charged with attempted murder, criminal possession of a weapon and assault in the shooting of Sgt. Craig Bier, police said.

Thomas turned himself in to authorities on Sunday.

Bier was working with an anti-gang unit on 107th Street in Jamaica when he was shot in both legs on Aug. 8, police said.

Police said the suspect then tossed a 9 mm pistol on the ground and ran off. Bier was left bleeding on the ground as fellow officers rushed to help.

Bier was taken to the hospital where a bullet was surgically removed from one leg. Another bullet went in and out of his other leg. He was released from the hospital a few days later.

Bier, a 15-year veteran, was the 10th New York City police officer to be shot this year.

Watch & Listen LIVE