A Latin Kings member was planning on having sex with his girlfriend – until he discovered that she was born male.

Joshua Vallum, 29, was sentenced to 49 years in prison – a reduction from the original life sentence – for the murder of his girlfriend in Mississippi who he discovered was transgender, the New York Daily News reported.

Vallum previously pled guilty under the federal Hate Crimes Prevention Act to the murder of Mercedes Williamson, 17, in 2015 when he solicited sex from her. Vallum initially told authorities that he learned through a friend that Williamson, with whom he had a romantic relationship with, was born a male. Upon that discovery, he shocked her with a stun gun before stabbing and beating the victim to death with a hammer.

During his plea, Vallum admitted to knowing that Williamson was transgendered during their relationship.

On the night of the murder, Vallum took Williamson across state lines from Alabama to Mississippi where he later tried to dispose of the evidence on property that his father owned.

Judge Louis Guirola Jr. purportedly decided not to pursue a harsher sentence for Vallum “due to his history of being abused as a child,” the New York Daily News noted.

Attorney General Jeff Sessions was satisfied with Vallum’s sentencing.

“Today’s sentencing reflects the importance of holding individuals accountable when they commit violent acts against transgender individuals,” Sessions said. “The Justice Department will continue its efforts to vindicate the rights of those individuals who are affected by bias motivated crimes.”

Ryan Saavedra is a contributor for Breitbart Texas and can be found on Twitter at @RealSaavedra.