It wasn’t until Josh Vallum was kissing Mercedes Williamson that he reached between her legs and realized she had a penis.

The next thing he knew, he was standing over the transgender teen’s dead body with a hammer in his hand.

That, at least, is the story Vallum, a member of the Latin Kings street gang, told sheriff’s deputies in George County, Miss., after 17-year-old Williamson was discovered in a shallow grave last spring.

On Tuesday, more than 13 months later, Vallum was sentenced to life in prison after pleading guilty to first-degree murder, according to the Associated Press.

“I killed Mercedes Williamson, sir,” the 28-year-old told the judge, WLOX reported.

Even as Vallum’s sentencing seemed to close the murder case, however, questions remained about his account of the killing.

A roommate claimed Vallum and Williamson were a couple and that Vallum knew his victim was transgender long before the murder. The two had an active sex life, the roommate said, and Vallum even took his transgender girlfriend to a Latin Kings beach party.

Instead of shock, it was self-preservation that motivated the murder, as Vallum killed Williamson because she knew too much about his gang activities, Vallum’s brother and a friend testified, according to the Biloxi Sun Herald.

Vallum’s plea, meanwhile, avoided what promised to be an explosive trial in which prosecutors threatened to call other Latin Kings to the witness stand and expose the structure and finances of the gang.

The truth about the killing could determine whether Vallum faces an additional federal hate crime charge and, potentially, the death penalty.

The case drew national attention last summer when Caitlyn Jenner mentioned Williamson during her ESPY Awards acceptance speech.

“They’re getting bullied, they’re getting beaten up, they’re getting murdered and they’re committing suicide,” Jenner said during the July 15, 2015, ceremony before mentioning Williamson’s murder just a weeks earlier. “The numbers that you just heard before are staggering, but they are the reality of what it is like to be trans today.”

Williamson was one of at least 21 transgender women killed in the United States last year, up from 12 such killings in 2014, according to the National Coalition of Anti-Violence Programs.

At first, however, authorities in Mississippi did not identify Williamson as transgender.

She was born Michael Christopher Wilkins and grew up in the small coastal city of Gulf Shores, Ala.

At a young age, however, Williamson began to identify as a girl.

“She liked to play with dolls, not trucks,” Jeanie Miller, 41, told the Sun Herald. “She said she just knew.”

Miller and Williamson lived together in a one-bedroom camper they rented for $50 a week in Theodore, Ala.

Williamson was a happy teenager with a habit of flipping the dark hair that hung well below her shoulders. Miller last saw Williamson on June 30 when the teen left the camper to meet someone.

“The last thing she said to me was ‘Love ya later,’” Miller told the newspaper.

The person Williamson met was Vallum.

Vallum was a decade older than Williamson and had been a member of the Latin Kings for eight years, according to authorities. He had risen to become the gang’s statewide secretary, in charge of collecting dues from members, and had a large tattoo on his left arm featuring a crown and his street name: King Chaos.

How well the two knew each other is disputed.

During a June pre-trial hearing, a roommate of Williamson’s testified anonymously that the 17-year-old and Vallum were open with their affection, and the dangers they faced from the Latin Kings, which forbids members from homosexuality.

One day, the roommate was sitting on their front porch with the couple when Williamson said she and Vallum would be killed if gang members learned the truth about them.

“We all looked at each other, like ‘Wow,’” the roommate testified, according to the Sun Herald.

The roommate said Vallum knew Williamson was transgender, and that the two spent several nights a week together, often hanging out in their underwear. They called each other “baby,” openly expressed their love for one another and had enjoyed an active sex life, she said.

Once, Vallum even took her to a Latin Kings beach party, the roommate testified.

Vallum, however, told investigators he barely knew Williamson.

He claimed the two were kissing when he discovered she was transgender and snapped, blacking out and regaining consciousness only when Williamson was already dead, according to the Sun Herald.

The murder weapon, a hammer, was in his hand.

After the killing, Vallum put the hammer and a stun gun into a plastic bag and threw it off a bridge, he told George County sheriff’s deputies.

On May 30, 2015, likely the day of the killing, Vallum arrived at his father’s house in Lucedale, Miss., near the border with Alabama.

Vallum walked in with blood on his shoulders, his brother, Jacob, testified.

“I asked him, ‘What the heck happened?’” Jacob Vallum said, according to the Sun Herald.

“Well, it was my life or his,” Josh responded, according to his brother.

A friend recalled a similar conversation two days later.

When Jacob Vallum walked into Danielle Marie Merrill’s house on June 1, 2015, she asked him what had been going on. He replied that he didn’t have “enough of a buzz to talk about it,” she testified. After grabbing a beer from her fridge, however, he began talking.

Vallum said he had buried a body on his father’s property, Merrill testified.

Stunned, she asked him to repeat himself.

“He … said it was either him or the other dude” Merrill said in court, according to the Sun Herald. He also said his victim “had too much information on him and he wasn’t going down.”

That same day, Josh Vallum told his father what he had done, according to a police report obtained by the newspaper.

The next morning, Vallum’s father accompanied four George County sheriff’s deputies as they searched the woods behind his house.

Within an hour, they found Williamson’s body, hastily concealed under some debris.

Vallum was arrested the same day and charged with murder.

DNA confirmed that the body belonged to Williamson.

Six weeks later, Caitlyn Jenner mentioned the slain teen while accepting the ESPY’s Arthur Ashe Courage Award.

Vallum initially pleaded not guilty. A trial, scheduled to begin next week, threatened to expose the inner workings of the state’s Latin Kings chapter after prosecutors said they would call fellow gang members to the stand.

Vallum’s guilty plea Tuesday brought the case to an abrupt close — at least in Mississippi.

Federal agents were in the courtroom for the hearing, according to the AP. The U.S. Department of Justice is still investigating the case and could file hate crime charges against Vallum.

For some of Williamson’s friends, a federal trial is now perhaps the best hope of finding answers to the mysterious murder.

“She was closer to me than my own daughter,” Miller, Williamson’s roommate at the time of her killing, told the Sun Herald in January. The teen’s death had left her distraught.

“I miss how she flipped her hair. I miss the crooked teeth with that beautiful smile,” she said. “I can smell her. I just keep wanting her to walk through the door.”

“I want to know why,” she said of the murder. “She didn’t do nothing to deserve that. Nothing.”