A Manhattan judge set bail for the homeless man who attacked an on-duty NYPD captain in Midtown.

The officer, Captain Stephen Spataro, was assigned to patrol the Midtown area when he was taunted and attacked by 19-year-old Elijah Hodge and another unidentified individual on Tenth Avenue and West 41st Street around 6:30 p.m. on Thursday, according to police.

According to the criminal complaint, Captain Spataro was punched in the head and sustained minor injuries.

Prosecutors who watched surveillance video of the incident believe Hodge is the one who punched the captain –– adding that the case is “strong” given that the entirety of the incident is on video.

Hodge was even wearing the same sneakers in the footage as he was on the day of his arrest, prosecutors added.

He was arrested on Tuesday evening and appeared before a judge on Wednesday morning.

Police are still searching for the second suspect in this incident.

Hodge is facing one count of attempted robbery in the second degree, which is a felony, according to the complaint.

The Judge set bail to $15,000 which he was not immediately able to post. Hodge is due to appear in court again on October 21.

In addition to this attack, Hodge was most recently arrested in connection to a string of assaults that took place in Brooklyn in August, according to police sources.

Hodge along with three other pals were charged in connection to attacks that took place on August 12 –– one of which includes an attack against a 71-year-old Jewish man around 5 a.m. in Williamsburg.

Hodge has two pending charges of robbery and assault from those arrests, according to court records.