A Texas man has been arrested and charged with capital murder, accused of shooting his 3-year-old stepson to stop him from jumping on a bed.

The incident happened on Tuesday afternoon in Clay County, and witnesses initially told police that the boy, Dominic Castro, had caused the gun to accidentally discharge while jumping on the bed, local station KDFX-TV reported.

George Coty Wayman, 18, was arrested Wednesday after further questioning revealed Wayman had pointed a gun at Castro and told him he would shoot him if he didn’t stop jumping on the bed. Wayman fired the gun and struck Castro in the head, according to authorities.

Castro died at a hospital Wednesday morning, the Dallas Morning News reported. Wayman was being held on $505,000 bail on Thursday.

Get The Brief. Sign up to receive the top stories you need to know right now. Please enter a valid email address. Sign Up Now Check the box if you do not wish to receive promotional offers via email from TIME. You can unsubscribe at any time. By signing up you are agreeing to our Terms of Use and Privacy Policy . This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply. Thank you! For your security, we've sent a confirmation email to the address you entered. Click the link to confirm your subscription and begin receiving our newsletters. If you don't get the confirmation within 10 minutes, please check your spam folder.

Write to Katie Reilly at Katie.Reilly@time.com.