This is an archived article and the information in the article may be outdated. Please look at the time stamp on the story to see when it was last updated.

A night out turned into a nightmare over the weekend for a woman in Virginia Beach.

The woman, who wanted to remain anonymous, said a friendly stranger attacked her and tried to sexually assault her at the Oceanfront, but she says the Emergency SOS feature on her iPhone helped save her life, CNN affiliate WTKR reported.

The woman was about to get into her Uber to go home around 2 a.m. Sunday when she was approached by a man.

“This guy came up to me and said, ‘I lost my phone… can you help me find my phone?'” she recalled.

The simple gesture for help was the bait.

“I wasn’t suspecting he was bad. He was a very normal, nice looking guy,” the woman told WTKR.

The man lured her back to the boardwalk to find a lost phone. She said she just wanted to help.

“I was like, ‘Where are your friends? Why are you alone?’ He was like, ‘I’m in the military. I’m not from here,’ and my brother is in the military—I felt bad for him,” she said.

It was a believable story from someone who didn’t appear threatening.

He eventually told her he might have lost his phone in the sand. The woman said she let him use the “Find My iPhone” app on her phone, but it wasn’t working. She got a terrible feeling when she realized he didn’t know how to navigate her iPhone to use the app.

“I get my phone back and I turn around and I try to run away and he just comes up from behind me, tackles me, grabs my face, is covering my mouth,” the woman said.

The two struggled in the sand, and at one point the man told the woman he had a knife.

“I’m trying to scream for help, [he] tackles me to the ground – is like shoving my face to the ground – and now, because I’ve been screaming, he’s holding my mouth even tighter trying to muffle any noise I’m making,” the woman said.

In the middle of a fierce attack, the woman was poised and made a life-saving call without her attacker knowing.

She used her iPhone’s Emergency SOS feature. To activate the SOS feature, she held the power and volume button down at the same time. Users can also tap the power button five times. It only works if the Emergency SOS feature is turned on in the phone’s settings.

Her iPhone automatically dialed 911— dispatch was on the line listening and sent police to her location.

“He looked up and the headlights from police were shining from the sand, and he just took off and ran down the beach and the police ran after him and they were able to get him in a foot pursuit,” the woman said.

The nightmare was over.

“I’m so thankful for those police officers. I know they have a thankless job, and I just can’t thank them enough,” she said.

The woman said police caught her attacker and it’s all because of the simple safety feature on her phone.

“They were originally going to look in the hotels and dispatch updated them that I was talking about the water— I’m begging him not to drown, I don’t want to drown – so they knew to come look in the sand,” she explained.

Now, she just wants to warn others and help them be more prepared.

“All the cards lined up for me, but I know that doesn’t always happen and people aren’t so lucky. And if there’s anything we can do to be proactive, we should do it,” the woman said.