POLK COUNTY, Fla. (WFLA) — The crash detection setting on an Apple iPhone helped deputies find three teenagers after they allegedly wrecked a stolen car Thursday morning.

Around 2:35 a.m., the Polk County Sheriff’s Office was alerted to a single-vehicle crash on Lake Hatchineha Road (County Road 542) near Firetower Road in Poinciana. Deputies said one of the teen’s iPhones detected the crash and auto-reported the incident to officials.

After receiving the alert, deputies and Polk County Fire Rescue crews responded and found three teenagers crawling on the ground near the damaged black Kia Sorrento.

According to the sheriff’s office, two of the suspects, a 15-year-old and a 14-year-old boy, suffered serious injuries and were airlifted to the hospital. The 15-year-old is in critical but stable condition, and the 14-year-old is stable.

A 14-year-old girl, who was picked up by the two boys in the stolen vehicle, was taken to the hospital with internal injuries, according to PCSO. She is also in stable condition.

All three of the teens are expected to survive.

The Kia Sorrento was stolen somewhere in the area of Dogwood Road and Narcissus Lane, about three miles north of the crash.

“The three suspects were out committing serious crimes, and it almost ended tragically for them. It’s too early to tell if they will have any severe long-term problems due to their injuries, but regardless, we’re going to hold them accountable to the fullest extent for their crimes,” Polk County Sheriff Grady Judd said. “This criminal behavior isn’t going to be tolerated. They could have very easily killed themselves or an innocent person.”

The sheriff’s office said the 15-year-old and 14-year-old boys will be charged with grand theft of a motor vehicle and conspiracy to commit grand theft of a motor vehicle. The 14-year-old girl was charged with trespassing in conveyance.