Police have arrested a 17-year-old accused of maintaining a social media account intended to intimidate witnesses to violent crimes in Philadelphia.

Officers said the teen named witnesses to four shootings, including a 2007 homicide, and posted secret court documents.

The caption beneath one photo read: “EXPOSE ALL RATS.”

Officers learned about the Twitter account Oct. 24 and said they confirmed that it belonged to Nasheen Anderson, and arrested him at Martin Luther King High School.

Anderson, a student, was charged with witness intimidation and terroristic threats.

He was booked into the Juvenile Justice Services Center, but the district attorney’s office said he would be prosecuted in adult court.

"Witness intimidation has reached near-epidemic levels, and we are very serious about not only stopping it, but also prosecuting the criminals who are engaging in these despicable actions, to fullest extent of the law,” said District Attorney Seth Williams.

Investigators said it could prove difficult to determine how the teen got photos of the grand-jury evidence, which was also posted on an Instagram account that was shut down last week.

The Instagram account, rats215, revealed details about more than 30 witnesses to violent crimes, police said.

Authorities aren’t sure who’s behind the Instagram account or whether Anderson is also connected to it.

Anderson’s mother said her son was a “good kid” who hadn’t posted the information maliciously.

"He's not a kid that's bad and running around in the street,” said Hope Anderson. “He's not trying to cause harm to nobody. These are . . . children just speaking about their opinion and them not realizing the effect sometimes of what they put on social media.”

The teen’s mother sued the city and its police department in 2011, claiming that officers had falsely arrested her son and roughed him up after he was suspected in a shooting.

A jury ruled against the family and ordered them to pay more than $2,600, and an appeal was denied earlier this year.

In addition to the posts related to the shootings, police said Anderson also posted of himself flashing gang signs, nude photos of women and photos of a smiling woman pointing a handgun at four smiling young children.