The 30-year-old was found on Sunday night in a container at the Pasir Panjang Terminal, local newspapers reported.

He was trapped in a container for three weeks with no food and water.

His only companion? The decomposing body of a co-worker who was accidentally locked inside the container with him.

How Bangladeshi Din Islam survived the ordeal is anyone's guess.

The 30-year-old was found on Sunday night in a container at the Pasir Panjang Terminal, local newspapers reported.

Din was discovered by workers at the dock in the container, which had been shipped over from Bangladesh two weeks ago.

The police are currently investigating the case, and believe that both men were port workers in Bangladesh, and were accidentally trapped inside the container while resting in it.

On March 21, the two men had finished their chores at the Chittagong Port in Bangladesh, and went into an empty container to take a nap. Upon waking up, they found that the container door had been locked and they were in total darkness.

The ship arrived in Singapore five days later, and then spent two weeks under the sun. During this time, the other man trapped in the container died. Din was eventually found when he gathered his strength to hit on the container a few more times.

Dock workers, who were preparing the container for shipping to Vietnam, heard banging sounds coming from the inside of the container. Upon opening it, they found Din together with the decomposing corpse of his co-worker, known only as Alamigir.

Both men did not have travel or identification documents on them, and there was no food and drinks were found, which supported the story that they were trapped on board by accident and not intentional stowaways.

Din was visited by officers from the High Commission of Bangladesh, who will be helping him get in contact with his family in Bangladesh.

He is now recuperating at Alexandra Hospital and is said to be in a stable condition. Doctors have said that it is possible to survive for a person to survive for up to a fortnight without water, and up to a month without food.

However, other factors also affect this, such as the person's health and age, and the rate which he loses body fluids through perspiration.