A Prince George’s County teenager has been indicted on charges of solicitation to commit murder and related counts after he posted menacing and offensive messages on his Twitter and Facebook pages, some of them about a county Circuit Court judge, authorities said Thursday.

Garrett A. Bailey, 16, of Bowie allegedly posted the messages about Judge Herman C. Dawson early last month, after Bailey admitted his involvement in a breaking-and-entering case and a theft case in juvenile court, according to police charging documents. He was scheduled to be sentenced in front of Dawson later in the month, according to the documents.

The recent indictment charges Bailey as an adult with nine criminal counts, including solicitation to commit murder, threat on a state official and misuse of electronic mail.

It remains unclear why Bailey might have been upset, or if his apparent anger was exclusive to his case. In one message, Bailey asked, “Who wants 1000 to kill” Dawson, according to the charging documents. In another, he threatened a person who “snitched on my manz,” saying he owned a gun that “has a body on it already,” according to the documents.

The messages were laced with profanity and racial slurs, and investigators found at least one image showing Bailey with a gun in his waistband, according to the charging documents. Bailey, according to court records, is white. Dawson is black.

The investigation started after police received an anonymous tip about the postings, court papers say. Bowie police and county sheriff’s deputies — who handle courthouse security — explored Bailey’s Facebook and Twitter pages and talked with Dawson, who “appeared shaken and concerned for his safety and the safety of his family,” according to court papers. Dawson requested additional security while investigators probed the case, according to the documents.

Reached Thursday evening, Dawson said he was attending a conference and was not aware of the indictment. He said he had “stayed away” from the case after police first talked to him about it.

Online court records show Bailey was arrested last month soon after the Feb. 2 threats, and it does not appear that he was released. William Haskell, who was listed as Bailey’s lawyer when he was charged initially, could not immediately be reached for comment.

A woman who answered the phone at an address listed for Bailey declined to comment or identify herself.