A federal court in Mississippi handed down a 49-year prison sentence on Monday to Joshua Brandon Vallum, the first person prosecuted under the Hate Crimes Prevention Act for targeting a victim because of gender identity.

Vallum had pleaded guilty last year to the 2015 assault and murder of Mercedes Williamson, a 17-year-old transgender girl whom he says he once dated.

"Crimes motivated by hate have devastating effects on the victims, their families and community but also leave a blemish on our society as a whole," Christopher Freeze, special agent in charge of the FBI's Jackson Division, said in a statement.

The Justice Department says it's the first case "involving a victim targeted because of gender identity" prosecuted under the Matthew Shepard and James Byrd Jr. Hate Crimes Prevention Act — a law that was expanded in 2009 to cover victims attacked because of their gender identity, sexual orientation or disability.

The federal case itself moved quickly.

Charged on Dec. 14, 2016, Vallum pleaded guilty just one week later. He faced a sentence of up to life in prison, though U.S. District Judge Louis Guirola Jr. "heeded a lesser sentence suggested in a plea agreement between defense attorneys and prosecutors, citing Vallum's neglected childhood and other issues," according to The Associated Press.

Vallum is already serving a life sentence for the same incident, having pleaded guilty to murder last July in a case brought by the state of Mississippi. BuzzFeed News reports the state does not have its own hate crimes law on the books.

Here is how the Justice Department lays out Vallum's crime:

"During his plea hearing, Vallum admitted that he had a consensual sexual relationship with Williamson and that he knew Williamson was transgender. During his romantic relationship with Williamson, Vallum kept the sexual nature of the relationship, as well as that Williamson was transgender, secret from his family, friends, and other members of the Latin Kings and Queens Nation gang to which he belonged. After Vallum terminated his romantic and sexual relationship with Williamson, he had no contact with her until May 2015."Vallum admitted, as part of his guilty plea, that on May 28, 2015, he decided to kill Williamson after learning that a friend had discovered Williamson was transgender. Vallum believed he would be in danger if other Latin Kings members found out that he had engaged in a consensual sexual relationship with a transgender woman. On May 29, 2015, Vallum located Williamson at her residence in Alabama and used false pretenses to lure Williamson into his car so he could drive her to Mississippi. Vallum drove Williamson to his father's residence in Lucedale, Mississippi. Vallum admitted that he then used a stun gun to electrically shock Williamson in the chest, repeatedly stabbed Williamson, and struck Williamson with a hammer until she died."

That summary contradicts an account initially offered and retracted by Vallum, who claimed at first to have "killed Williamson in a panic after discovering Williamson was transgender," the Justice Department says.

In a statement, U.S. Attorney General Jeff Sessions applauded the result of the case, which was brought just weeks before his tenure began.

Copyright 2017 NPR. To see more, visit http://www.npr.org/.