ALPENA COUNTY, Mich. (WLNS) — Police say a 7-year-old girl was nearly kidnapped if not for her 14-year-old brother, who fended off the alleged assailant with a slingshot.

According to Michigan State Police, the girl was mushroom hunting in her backyard when an 17-year-old male from Alpena appeared from the woods.

Officials say the suspect held the girl’s mouth shut before a struggle ensued. The girl’s brother witnessed the assault and shot the man with his slingshot in the head and chest.

The suspect’s identity has not been released by law enforcement.

Michigan State Troopers from the Alpena Post were able to find the suspect hiding at a nearby gas station. He was arrested and taken to the Alpena County Jail, where he confessed that he planned on “severely beating the victim.”

The 17-year-old suspect was arraigned in the 88th District Court on May 11 for one count of attempted kidnapping/child enticement, one count of attempted assault to do great bodily harm less than murder and one count of assault and battery.

Police later arrested the 17-year-old based on another family member’s description of the suspect.

Authorities also said the teenager had visible wounds from the slingshot.

He is being charged as an adult. His next court appearance is May 17.