A Brooklyn rapper has been indicted on hate crime charges after he stabbed, slashed and threatened three men while shouting homophobic epithets earlier this month, Brooklyn prosecutors said.

“In Brooklyn, everyone, regardless of their race, ethnicity, sexual orientation, gender or religion must be able to safely walk the streets without fear of being senselessly attacked,” Acting District Attorney Eric Gonzalez said in a statement.

James Thomas, who also goes by Mousey Baby, was inside the Crown Fried Chicken on Fulton Street in Bedford-Stuyvesant when he started yelling homophobic slurs at customers around 4:30 a.m. on March 5, Gonzalez said.

Thomas was mainly yelling at people who had just left the nearby Langston Club -- known as a predominantly gay night club -- when he rounded on a man and slashed him in the face before leaving the restaurant, Gonzalez said.

But Thomas didn’t stop there. As he left, he pushed and threatened another man, and then stabbed a third man as they tried to enter the restaurant, according to the DA’s office. Both men had just left Langston Club, they said.

Thomas fled before cops arrived, but later turned himself in after the NYPD released surveillance video of him, Gonzalez said.

Meanwhile, the man who was slashed received 18 stitches on the left side of his face, according to the DA’s office. The man who was stabbed was treated for wounds to his torso and shoulder.

“This defendant’s alleged actions were particularly egregious as he attacked three innocent people simply because he perceived them to be gay. We will now seek to hold him accountable,” Gonzalez vowed in the statement.

A Facebook page apparently representing Thomas as Mousey Baby claims he was a ghost writer for “industry celebrities” and mentions a mixtape album that was released called “Brooklyn is My Home.”

Thomas, 32, of Prospect Heights, Brooklyn, was arraigned Wednesday in Brooklyn Supreme Court on charges of first-degree assault as a hate crime, menacing, aggravated harassment and criminal possession of a weapon. He is being held on $150,000 bail and is due back in court on May 10.