CNN  — 

Three boaters clung to a makeshift raft of ice chests and fended off shark attacks and jellyfish stings in the waters near Empire, Louisiana, until they were rescued 28 hours later, all thanks to a miraculous text message.

The three longtime friends set out on October 8 to fish red snapper like they had many times before. But rough seas soon began disturbing their fishing boat, lapping water inside the vessel.

“The minute we saw the back of the boat start taking on water, I knew it right then and there,” Phong Le told NBC’s “Today” show on Wednesday. “It was like the perfect storm for the perfect accident.”

The front of the boat was tied to an oil rig, but the waves worsened, crashing aboard the boat. The men had about two minutes to react before their 24-foot center console boat sank around 10 a.m., according to an interview with “Good Morning America.”

The men quickly created an improvised raft, tying two ice chests together with Le’s bandana.

“Every time I go fishing, I wear a bandana because I lose a hat every time,” Le said.

They tried to propel themselves toward the oil rig to call for help.

“Every oil rig has some kind of phone, or something on there, so we figured we could get on there and we could make a distress call,” Le said. But they never made it.

A shark attacks

As the sky grew dark, the three men clung to the coolers, the moon providing some comfort.

“Good thing there was full moon out because we had light,” Luan Nguyen told NBC. “We couldn’t barely see anything, so we just drifted at night.”

Until an unwelcome visitor arrived. A shark battered into Nguyen and a fight for survival ensued.

“The shark hit the life vest and I tried to push him off. He wouldn’t go away, so I jabbed him in his eyes,” Nguyen told NBC. “I put my thumbs in his eyes and he took off. I got a little couple scars, but you know.”

One of the boater's life jackets was torn due to shark attacks.

Other sea creatures made their presence known too, making things even harder for the floating men.

“Every 15 to 20 minutes, you were constantly being stung by jellyfish,” Le told NBC.

“In the middle of the night, I woke up with this jellyfish this big just in my lap,” Le added, motioning during the interview that the jellyfish was about as wide as he was.

The men stayed mostly silent through it all, bobbing in the water.

“It was very cold, so we were just trying to stay warm, just trying to hold each other and stay warm,” Le said.

They were spotted from the air

Le separated from the group the next morning. He wanted to swim about five miles to a shrimp boat and call for help, he told NBC. But when he got about a mile out, the shrimper left, he said.

Trying to figure out his location, Le took out his cell phone, protected by a waterproof case – it had less than 5% battery and was in airplane mode to save the charge.

“I opened up my phone and that’s when all of a sudden, all of the text messages came in,” Le said. “The whole time I didn’t have no signal but out in the middle of the Gulf of Mexico, I had a signal.”

Le didn’t waste time. He said he screen-grabbed his location on a map and texted it to a friend. The phone died soon afterward.

The friend received the message and contacted the Coast Guard with the boaters’ location.

The men didn’t know it, but before the miraculous text message went through, the Coast Guard was already on their way, Lt. Katy Caraway from Air Station New Orleans told CNN on Thursday. She was the co-pilot of a Jayhawk helicopter that helped rescue the men.

Five minutes into their flight, Caraway said they got the radio transmission that there was new information they could use in the search. It took them 25 minutes to get to the location sent in the text message.

After 15 to 20 minutes of searching the waters, a pilot from a Coast Guard airplane, cruising at an altitude of 1,000 feet, spotted one of the men waving from the water, Caraway said.

A Coast Guard  Jayhawk aircrew treats the rescued boaters for injuries.

“Le, he was the first survivor that we picked up and he was actually the one who got separated from the rest of his group because he had tried swimming to a shrimp boat to call for help,” Caraway told CNN.

A rescue swimmer jumped from the helicopter and swam over to check on Le, Caraway said.

“He didn’t talk much at all,” she said. “He was completely exhausted.”

Caraway moved into position, dropped the rescue basket and hoisted Le up to the helicopter.

It was about that time that the helicopter crew heard that the other two boaters had been found nearly a mile away, Caraway said. They flew to the response boat to help.

Two boaters were rescued from sharks

A Coast Guard Station Venice boatcrew treats two boaters for shark bites and hypothermia.

Coast Guard Seaman Andrew Stone was on a 45-foot response boat when the call came in about the other two men, he said.

“They were getting harassed by sharks when we pulled up,” Stone said.

Nguyen was bleeding into the water, his hands covered in bites from blacktip sharks, about 4 feet in length, Stone told CNN on Tuesday.

“His orange life preserver had been ripped about halfway down by the fish,” Stone said.

Stone pulled Nguyen onto the boat first.

“I just remember him picking me up, pulling me out of the water, was like ‘wow, I made it,’” Nguyen told “Today” with tears in his eyes.

Petty Officers Joshua Mcanally and Cooper Butcher pulled the second man from the water, Stone said.

“These guys were suffering from pretty severe exposure. They were very dehydrated, hungry, of course,” Stone said.

The boaters were also sunburned and suffering hypothermia when they were rescued Sunday, he said.

“The water temperature of the Gulf, where they were, (was) 78 degrees, which sounds warm, but anything below your body temperature will start robbing heat,” Stone said.

The Coast Guard crews reunited the men pulled from the water with Le, who was already on the helicopter, he said.

The rescue ‘takes the cake’

Coast Guard Lt. Katy Caraway reunites with survivors Phong Le, left, and Luan Nguyen.

Members of the Coast Guard train for these kinds of events, but this rescue was anything but ordinary, Caraway said.

“People like this who have been in the water for a long time, who have been displaced from their vessel with no form of communication, it is almost impossible to find them and recover them,” Caraway said. “This takes the cake for the rescue.”

“The likelihood of finding these individuals before the text message,” Caraway added, “was slim to none. After the text message, it was still very slim.”

A Coast Guard rescue swimmer escorts one of the rescued boaters into University Medical Center New Orleans.

In all, about 30 Coast Guard members were involved in the search effort.

“To bring these people home, it’s something we train for every week and to do it textbook operationally and actually save three survivors … was just probably the best feeling that you can have as a Coast Guard operator,” Caraway said.

Coast Guard Sector New Orleans is planning a gathering for the survivors and all response units who were part of the rescue.

“I just look at it as doing my job,” Caraway said. “I’m just happy that they will be able to spend the rest of their lives with their families.”

CNN’s Jamiel Lynch, Jennifer Henderson and Melissa Alonso contributed to this report.