(CNN)Kristina Barneski was panicking.
The water was up to her knees. And she needed to get out of her apartment fast.
But she couldn't get the door to open. And she was afraid that if she broke the glass windows, the water outside would come gushing in.
Desperate, and not knowing what to do, Barneski texted a friend.
"My apartment flooded its [sic] so bad."
That text started a thread between a woman trapped by the floodwaters from Hurricane Irma, a friend thousands of miles away in California and first responders who eventually reached her.
This is the story of a rescue that Twitter and text messages made happen.
'I can't open the door to get out'
It was 3:12 a.m. Monday. Water was everywhere in Barneski's first-floor apartment in Daytona Beach.
Not knowing what to do, she texted her friend Hannah Brown. Brown used to live in Florida, but had moved to San Jose, California.
At first, Brown tried to reassure her. The worst of the storm should pass soon, she said.
"Yea I'm drown first," Barneski replied.
Try to get to your upstairs neighbors, Brown suggested.
"I can't open the door to get out," Barneski replied.
Brown said she'll ask her Facebook friends whether anyone can drive over and get her. "Worth a shot right?" she asked.
That option wouldn't work either, Barneski said.
"They can't come out curfew you will go to jail," she wrote.
Brown knew she had to do something, but what could she do from so many states away. So she took to Twitter.
"PLEASE HELP," she pleaded.
Brown reasoned the call-out was worth a shot.
"You might get a call or text from a stranger wanting to come help you out tho so make sure you answer if it's an unknown number," she told Barneski.
In the meantime, Barneski had called 911. But, as with police forces all over the impacted areas, the one in her area was deluged with calls.
"They can't get to me till morning," she texted Brown.
'She can't break out'
So, Brown continued her online campaign -- tweeting her friend's address to officials.
"She can't break out," she wrote.
Minutes ticked by. Brown agonized.
"GOD it's unbelievably frustrating to be in California while all my friends are home in Florida and Georgia, trying to survive this storm."
'Will go to my counter top if I have to'
The water poured in. Brown offered tips that could help.
"You gotta stay up on top of the furniture out of the water if you're not already," she texted.
"I know I'm on my bed and will go to my counter top if I have to," Barneski responded.
Brown told Barneski she should find a white towel or shirt that "you can wave at rescuers come morning light."
'They got me'
She then began sending Barneski pamphlets on surviving floodwaters.
"Dunno if any of this will help but I'm trying," she texted.
Two long hours passed.
And then came a welcome text from Barneski.
"They got me," she wrote.
"Omg they're there?!"
"Some team got me"
Turns out it was a rescue team from the Daytona Beach Fire Department. They took Barneski to a shelter where she's waiting for a friend to come and get her.
The department also tweeted out the good news to Brown.
"We were able to rescue your friend," the tweet said.
'Talk about the power of social media'
Barneski left with only the things she could carry. "I left with what little I could grab," she told CNN.
But what matters most is that she's safe.
"Talk about the power of social media," Brown told CNN. "She's like family to me. I'd do anything for her."