Joshua Brandon Vallum, 29, of Lucedale, Mississippi, was sentenced this week in the Southern District of Mississippi to 49 years in prison for assaulting and murdering Mercedes Williamson because she was a transgender woman.

The lengthy sentence “reflects the importance of holding individuals accountable when they commit violent acts against transgender individuals,” the U.S. Department of Justice said in a statement.

Vallum pleaded guilty last December to a single federal charge alleging he violated the Matthew Shepard and James Byrd Jr. Hate Crimes Prevention Act in committing the murder two years ago this month in Mississippi.

In entering his guilty plea, the defendant, a member of the Latin Kings and Queens Nation gang, admitted that he had a consensual sexual relationship with Williamson, who was 17, and knew the victim was transgender. Vallum previously pleaded guilty to a state murder charge and was sentenced to life in prison.

During his romantic relationship with Williamson, Vallum kept the sexual nature of the relationship, as well as Williamson’s transgender status, secret from his family, friends and other members of his gang, investigators said.

After Vallum terminated the romantic and sexual relationship, he had no contact with her until May 28, 2015 when he decided to kill Williamson after learning that a friend had discovered Williamson was transgender, the defendant admitted during his guilty plea.

Federal investigators said 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 her into his car so he could drive her to his father’s residence in Lucedale, Mississippi. There, Vallum admitted he used a stun gun to electrically shock the victim before repeatedly stabbing her and striking her with a hammer until she died.

After the murder, investigators learned, Vallum attempted to dispose of the murder weapons and other evidence linking him to the crime.

Vallum also falsely claimed to investigators that he killed Williamson in a panic after discovering she was transgender. In pleading guilty, Vallum acknowledged that he had lied about the circumstances surrounding the homicide and that he would not have killed Williamson if she was not transgender.

“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,” FBI Special Agent in charge Christopher Freeze said in a statement about the case.

The outcome of the case, Freeze said, “would not have been possible without the partnership between local, state and federal law enforcement.”