HOUSTON (CBSDFW.COM/AP) — A 19-year-old Houston girl has been charged with injury to a child, accused of accidentally shooting her 10-year-old nephew while taking a selfie video with a gun for her Instagram account.

According to an arrest affidavit, Caitlyn Smith told investigators she was babysitting her nephew at her apartment when the incident happened.

READ MORE: Texas Gov. Greg Abbott Signs Law Restricting Transgender Students In School Sports

(credit: Harris County Sheriffs Office)

The teenager said she had 9-millimeter handgun and was taking cellphone video for her Instagram account of herself pointing the weapon in different directions — finger on the trigger.

READ MORE: Dallas Police Searching For Man Who Shot 2 Victims After Argument On Royal Lane

The teen reportedly racked the slide of the gun, ejecting a live bullet on the floor. She said that after completing the video, she was having trouble removing the magazine clip and believing the safety was on squeezed the trigger in an effort to loosen it. Instead, the gun fired.

The round struck her nephew in the abdomen. The little boy was taken to a nearby hospital where he underwent surgery. Authorities said no vital organs were hit and Harris County Sheriff Ed Gonzalez tweeted the child is expected to recover.

At a preliminary hearing Thursday Smith was ordered to avoid contact with the boy. Her bail was set at $20,000.

MORE NEWS: American Airlines Donates Miles To Provide Flights For Afghan Refugees

(© Copyright 2020 CBS Broadcasting Inc. All Rights Reserved. The Associated Press contributed to this report.)