Pennsylvania Supreme Court Chief Justice Thomas G. Saylor attends a ceremony at the National Constitution Center in Philadelphia on Jan. 5, 2016. (Matt Rourke/AP)

A rap song that identified Pittsburgh police officers by name and made direct threats of violence against them is not protected speech under the First Amendment, Pennsylvania’s highest court ruled Tuesday.

The ruling by Chief Justice Thomas G. Saylor upheld the conviction of Jamal Knox, now 24, who was found guilty of making terroristic threats and witness intimidation for writing and performing a 2012 song titled “F— the Police.” According to the opinion, the song named and threatened two officers, Daniel Zeltner and Michael Kosko, and a music video for the song also featured photos of them.

The officers had arrested Knox and Rashee Beasley, the other rapper on the track, in 2012 on various drug and weapons charges and were scheduled to testify against them, according to the opinion.

While the charges were pending, the duo wrote and recorded the song, which was then uploaded to YouTube by a third party and shared on a public Facebook page authorities connected to Beasley, the opinion said. The rappers were then charged in connection with the song. Tuesday’s ruling dealt only with Knox’s appeal.

The song is full of graphic language depicting violence toward police, including the lyric “I’ma jam this rusty knife all in his guts and chop his feet.” One line, “Like Poplawski, I’m strapped nasty,” references Richard Poplawski, a man on death row for the 2009 murder of three Pittsburgh police officers.

“This first verse is for Officer Zeltner,” Knox raps in the song under the stage name Mayhem Mal. The next line calls out “Mr. Kosko,” adding, “You keep on knocking my riches.”

In another verse, the lyrics indicated that the rapper seemed to know when the officers got off work — “Well, your shift over at 3” — and where they lived.

One of the song’s final lines is “Let’s kill these cops ’cause they don’t do us no good.”

In the ruling, the court stated that it ultimately found the song’s lyrics to be a “true threat,” which is a category of speech not protected by the Constitution.

In addition to reigniting concerns about free speech protections for a genre of music known for violent lyrics, the decision also raises a “key First Amendment question” dealing with specific intent, Clay Calvert, director of the University of Florida’s Marion B. Brechner First Amendment Project, told The Washington Post.

“The decision highlights the need for the U.S. Supreme Court to resolve whether the First Amendment protects speech if there is no specific intent on the part of the speaker . . . to put the target in fear of imminent bodily harm or death,” Calvert said.

In the opinion, the court said in a footnote that it is “not fully aligned” with the U.S. Court of Appeals for the 9th Circuit’s view that specific intent to threaten is an essential condition of a “constitutionally punishable threat.”

According to the Pittsburgh Post-Gazette, Knox’s attorney, Patrick Nightingale, argued that the song was “artistic.” Knox did not intend it to be a threat, and because he and Beasley did not post the video themselves, there was no proof that they meant for the officers to hear it, Nightingale said. Nightingale could not be reached for comment.

The court rejected that argument.

Aside from naming the two officers, Saylor wrote in the opinion, the song includes “clear expression repeated in various ways that these officers are being selectively targeted” in response to their encounter with Knox and Beasley.

Saylor wrote that the lyrics “express hatred toward the Pittsburgh police,” describing them as “both threatening and highly personalized to the victims.”

“They do not merely address grievances about police-community relations or generalized animosity toward the police,” he wrote. “They do not include political, social, or academic commentary, nor are they facially satirical or ironic. Rather, they primarily portray violence toward the police, ostensibly due to the officers’ interference with Appellants’ activities.”

Rap music has long been a point of contention within the courts, Erik Nielson, a University of Richmond associate professor who studies rap lyrics and criminal proceedings, told The Post.

While a majority of situations deal with prosecutors attempting to use a defendant’s rap lyrics as evidence that he or she committed a crime, Nielson said, there have been an increasing number of cases in which “the crime itself is in the lyrics.”

“I was disappointed with the decision,” he said, adding, “I absolutely do not agree with it.”

Perhaps the most concerning part of the opinion is the claim that the song does not include political, social or academic commentary, Nielson said.

Knox and Beasley’s song is a “remake” of N.W.A’s widely popular protest anthem “F— tha Police,” which Nielson describes as “one of the most famously political rap songs ever recorded.”

The 1988 song also includes descriptions of graphic violence toward police. One line goes, “And when I’m finished, it’s going to be a bloodbath/ Of cops, dying in L.A.” Another verse includes the lyrics, “I’m a sniper with a hell of a scope/ Taking out a cop or two, they can’t cope with me.”

Rap music draws on many artistic traditions, including figurative language, hyperbole and basing stories off “larger-than-life antagonists,” Nielson said.

“Anyone who begins to understand that sees these lyrics in a very different light,” he said. “. . . You wonder how they [the court] could believe that it has no political significance when the whole purpose of the song is to call out police brutality in their community.”

The opinion sets a precedent that could have adverse effects on the rap genre, Nielson said. If other courts were to follow suit, “you would quickly see the eroding of those standards, and it would become easier and easier to prosecute rap music as threats,” he said.

However, Calvert said, the opinion has a “silver lining” — an acknowledgment from the court that rap music is a legitimate form of art and that violent lyrics do not necessarily represent true threats of violence.

“We do not overlook the unique history and social environment from which rap arose,” Saylor wrote in the opinion.

The court recognized that not only do rap artists adopt stage personas different from who they are as individuals, but also they often make music that may include “violent references, fictitious or fanciful descriptions of criminal conduct, boasting, exaggeration, and expressions of hatred, bitterness, or a desire for revenge.”

“In many instances, lyrics along such lines cannot reasonably be understood as a sincere expression of the singer’s intent to engage in real-world violence,” Saylor wrote. But the song performed by Knox and Beasley “is of a different nature and quality,” he wrote.

In one section, the opinion referenced the track’s background sound effects, which included “bull horns, police sirens and machine-gun fire ringing out over the words, ‘bustin’ heavy metal,’ ” as additional evidence for why the song is threatening.

“You want to start laughing,” Nielson said. “This is like what would happen if your grandfather tried to read rap music and understand it.”

Four justices joined Saylor’s opinion in its entirety while two others, Justice David Wecht and Justice Christine Donohue, joined in an opinion partially concurring and partially dissenting. Wecht wrote that he agreed that Knox’s criminal convictions should be affirmed but that he did not agree with leaving specific intent as an “open question.”