A judge on Wednesday ordered a school district to readmit a 14-year-old student expelled for writing violent, profane rap lyrics, finding that his songs didn't amount to "true threats" against the school and so were protected by the First Amendment.

The Riverside Beaver County School District (search) kicked out Anthony Latour (search) because officials believed his lyrics constituted threats to shoot up the school and another student.

The American Civil Liberties Union (search), representing Latour, claimed his songs were "battle rap" — a music genre in which two people try to out-rhyme each other, often using violent putdowns.

U.S. District Judge Donetta Ambrose overturned his expulsion and issued a preliminary injunction ordering the district to admit Latour to the ninth grade when classes resume Aug. 31.

In one song, Latour wrote: "So watch what you say about me, I'm everywhere son / And the word of mouth is that I'm carrying guns / Now that I'm comin' for you — what the (expletive) you gonna do / I come double with the pump tons of slugs that will punish you."

School officials learned of LaTour's writings in March and contacted police, who charged him with terroristic threats and harassment. Latour was expelled in May. The charges are pending.

The judge said the school's argument that the music was threatening was weakened because school officials didn't take immediate steps to investigate the music, such as searching Latour's locker or contacting his parents. Furthermore, Ambrose said school officials didn't present any evidence that the songs disrupted school.

The school district and Latour's family didn't immediately comment.