NEW ORLEANS (AP) — Three men whose fishing boat sank in the Gulf of Mexico off the Louisiana coast were rescued after surviving for more than a day despite being attacked by sharks that inflicted deep cuts on their hands and shredded one of their life jackets, according to their rescuers.

Rescue crews found them only after one of the fishermen managed to send a text message from a nearly drained cellphone, U.S. Coast Guard Lt. Cmdr. Kevin Keefe said.

“It’s difficult for us to describe how lucky they were,” Keefe told NBC’s “Today” show on Tuesday. “All these things happened in their favor.”

The fishermen left Venice, Louisiana, during the weekend and became stranded when their 24-foot (7.3-meter) boat sank. The Coast Guard launched a search after a family member called Saturday night saying they hadn’t returned.

In this screenshot from video, the U.S. Coast Guard rescues boaters off the coast of Empire, La., on Sunday, Oct. 9, 2022. Three men whose fishing boat sank in the Gulf of Mexico off the Louisiana coast were rescued after surviving for more than a day despite being attacked by sharks that inflicted deep cuts on their hands and shredded one of their life jackets, according to their rescuers. (U.S. Coast Guard via AP)

Using boats, planes and helicopters, the Coast Guard spent hours searching an area of the Gulf larger than Rhode Island, but found no sign of the missing fishermen.

Then, a relative forwarded the Coast Guard a text message from one of the men. It was a Google maps screenshot showing their approximate location in the water.

“He told me he had 2% battery and he fired off that text message,” Keefe said of the fisherman who sent the message.

When rescuers spotted the men Sunday afternoon off the coast of Empire, Louisiana, they saw two of them fighting off sharks circling in the water and a boat crew pulled them from the water, the Coast Guard said. A helicopter crew rescued the third, who was about a half-mile (0.8 kilometers) away. All three were taken by helicopter to a New Orleans hospital in stable condition.

The two who fended off sharks “had multiple lacerations on their hands, almost down to the bone,” Lt. Katy Caraway, a Coast Guard co-pilot, told “Today.” She added: “We actually were able to recover one of the life jackets that had been eaten through by a shark.”

The Coast Guard did not release the names of the fishermen. Keefe said had the three men not been wearing life jackets, they might not have survived.