Two men in Australia lived their worst nightmare as they had to spend two nights in crocodile-infested waters after their boat sank Thursday.

The pair were traveling along the Daly River in Northern Territory's Top End when the incident took place.

The boat they were on struck a submerged object and sank within seconds, 7News reported Monday. As the boat went inside water, they were unable to grab their mobile phones or trigger an emergency beacon (EPIRB). They somehow managed to swim against the tide while keeping a lookout for crocodiles lurking nearby. The duo managed to reach a nearby island and was stranded there without any food or water, NT police said.

Authorities also said that the men resorted to using an Esky lid to write a ‘HELP’ message, waiting for anyone to come and rescue them. The men were saved when another boat cruised through the area Saturday morning.

When the man on the boat spotted some debris floating in the water from the sunken vessel, he immediately looked around. Shortly after, the man spotted the two stranded people and brought them to safety.

“The men are very lucky to have survived this ordeal, given the remoteness of the area, the presence of saltwater crocodiles and the extreme heat at this time of year,” NT Police Acting Sergeant Troy Harris said, according to 7News. “We especially commend the skipper of the rescue vessel for saving these two men.”

"When they got into trouble, their safety equipment was not readily accessible in the short time they had before sinking," Harris said, according to ABC News. "They swam directly for the nearest land and made efforts to attract attention. Importantly, they stayed put."

"This incident highlights the need for a 'grab bag' with safety gear that is easily accessible, because the unexpected can happen, and it can happen in a matter of seconds," he added.

Both men were taken to Royal Darwin Hospital for treatment and were discharged shortly. The identities of the two people who were stranded have not been revealed by local police.

In September, a 60-year-old man was bitten by a 13-foot-long crocodile while he was on an adventure cruise in the Northern Territory. The man was on the tourist cruise along the Adelaide River, well known for its jumping crocodile cruises where the animals are lured out of the water with food.

crocodile-1323318_640
This is a representational image. Pixabay