An octopus will be released from a New Zealand aquarium after escaping from a tank and surviving five days on the run.

Last month Sid mysteriously vanished from his tank at a Dunedin aquarium.

Five days later, he was spotted by a staff member making a dash for the door.

Sid had been hiding out in a drain, which pumps fresh sea water into the aquarium.

He was persuaded back into his tank. He was hungry but otherwise OK.

The aquarium's senior aquarist, Matthew Crane, says Sid has done his time and will be freed.

"We are realising he is getting a little older in his life and maybe searching for a mate so that's why we've gone ahead and set his release for today," he said.

Another octopus named Harry - after Harry Houdini - escaped from the same tank.

He was found halfway up a staircase.