HOUSTON, Texas (KTRK) -- A Magnolia teen charged with murder was caught after he allegedly used Snapchat to post a video of himself at the crime scene.
William Underwood, 17, is in jail charged in the deadly shooting of Ryan Bates, 19, on July 16.
Harris County Sheriff's deputies responded to an apartment complex on Park Point Drive near Highway 6 in northwest Harris County. They found Bates with several gunshot wounds.
Almost a month later, Underwood was arrested and stood before a judge to hear some of the evidence against him.
The teen, nicknamed Ziggy, apparently posted a video of himself on Snapchat from the crime scene.
RELATED: 19-year-old shot and killed at northwest Harris County apartment complex
"The video depicts Ziggy, a white male, filming himself as he was driving by the crime scene as law enforcement was conducting their investigation," said a prosecutor.
According to court records, an eyewitness saw Underwood checking cars and said he had a Taser, which he used on her car before seeing him get into the victim's car moments before the deadly shooting.
"She could see the white male repeatedly tase the driver. She then stated the door closed and she heard multiple gunshots," the prosecutor said.
When Underwood was arrested on Aug. 8, he changed his story a few times, investigators said.
One version was that he contacted Bates on Snapchat to buy marijuana. When they met, he told deputies he thought Bates was going to rob him and so he first used the Taser and then a gun he had hidden in his waistband.
Afterwards, he got rid of his clothes and got on Snapchat.
"Went to his sister's apartment and started using Snapchat as an alibi so people would think he never left the house," read the prosecutor in court.
Underwood was given a high bond of $250,000 at first. It has since been reduced to $75,000. If he posts it, he will have a curfew and have to wear a GPS monitor.
"Our client has entered a plea of not guilty. We believe this is a self-defense case and look forward to presenting it in the courtroom," said Jed Silverman, Underwood's hired defense attorney.
Bates' father provided a photograph of his son from his prom. He described him as funny and kind.
He believes his son was randomly targeted and told ABC13 the two teens did not know each other.
Follow Jessica Willey on Facebook and Twitter.
Magnolia teen accused of murder posted on Snapchat from crime scene: court documents