HARRISBURG, Pa. (AP) — A rapper convicted of threatening police officers in a video posted online lost an appeal Tuesday when Pennsylvania's highest court called his lyrics "highly personalized" and ruled they were not protected by free speech rights.

The state Supreme Court turned down Jamal Knox's appeal of his conviction for witness intimidation and terroristic threats for the video that named two Pittsburgh officers.

The justices said Knox, 24, described how he intended to kill the two officers in the song.

"In this way, the lyrics are both threatening and highly personalized to the victims," wrote Chief Justice Thomas Saylor, adding that Knox spoke of when the officers' shifts ended and his plans to attack them "where you sleep."

Knox was awaiting trial when an officer found a YouTube video in 2012 of the song, which Knox argued was strictly artistic in nature and not intended as a threat to police. He denied posting it and said he did not intend it to be disseminated publicly.

Knox was facing drug charges after a chase in which he hit a parked car and a fence. Police recovered 15 bags of heroin and $1,500 on Knox and a stolen, loaded gun in the vehicle.

The song, performed under the name Mayhem Mal of the Ghetto Superstar Committee, includes the lines: "I got my Glock and best believe dog gonna bring the pump out and I'm hittin' your chest," as well as, "Let's kill these cops 'cause they don't do us no good."

The song also references Richard Poplawski, who is on death row for the 2009 murder of three Pittsburgh police officers.

The video was taken down from YouTube after three days.

Saylor said the lyrics did not amount to political, social or academic commentary and did not appear to be satire or ironic.

"Rather, they primarily portray violence toward the police, ostensibly due to the officers' interference" with his activities, Saylor wrote.

One of the officers said the video shocked him and was among the reasons he left the department and relocated, Saylor said. The other officer received additional security.

Knox's lawyer offered no immediate comment, and the Allegheny County district attorney's office declined to comment, saying the decision had not been fully reviewed.