BROOKLYN - A police pursuit near a middle school in Bedford-Stuyvesant ended with the suspect pulling a gun on officers, prompting them to shoot and injure him.

Authorities say two plainclothes officers who work with an anti-crime unit in the area saw 24-year-old Teddy Spann, of Staten Island, tugging on his waistband in the area of Malcolm X. Boulevard and Monroe Street at around 9:40 p.m. Friday. The officers approached Spann, and they say he fled and ran several blocks to M.S. 267 on Gates Avenue.

The officers say they chased the suspect on foot with help from another cop who was in an unmarked car. They say that when they caught up with Spann behind the middle school, he allegedly pulled out a loaded gun from his ankle and pointed it at them.

One officer shot Spann in the stomach. He was hospitalized in stable condition.

Two of the officers involved were also hospitalized for tinnitus, or ringing in the ears, after the incident.

Spann is now facing charges, police say.