A man has been arrested and a young girl is safe thanks to her quick thinking, police say.

The 7-year-old was walking her dog in her apartment complex in San Antonio last Thursday when police say Jack Steele, 42, sneaked up behind her and dragged her into the back seat of his SUV, KEYE reported.

Police say Steele drove off with the girl, but as he waited for the complex’s parking gate to open, the girl seized the moment: She opened the unlocked door, jumped out of the car and started to yell, KSAT reported. Police say Steele sped away.

Jack Steele, 42, is charged with kidnapping after a 7-year-old escaped from the back seat of his car in Texas, police say.

A number of surveillance cameras at the complex weren’t working and didn’t catch the attempted kidnapping on video, though the man police identify as Steele did appear on camera prior to the incident, KEYE reported.

Police released images of the man in a Facebook post on Friday asking the public to help identify him.

Steele was arrested on Wednesday after police received a number of tips as to his identity, KENS reported.

A neighbor told the news outlet that she’d previously caught Steele peering through her window and that he’d once tried to lure her daughter into his apartment. She says she alerted other neighbors after the incident.

“The fear is still there, because never do you expect that someone like that lives close to you,” the neighbor said, according to KENS.

After his arrest, Steele admitted he’d gone to “scope out a new apartment complex” but denied that the man in the surveillance video was him, despite admitting that he had worn a similar outfit that day, KSAT reported. He also denied that anyone had been in his car — but police say samples taken from the SUV support the girl’s story

Steele is charged with third-degree kidnapping, KEYE reported.