An orangutan shut in a dark, wooden box, measuring just one square metre has finally been freed after spending two years locked away.

Kotap was rescued by the charity International Animal Rescue (IAR) from his captivity in Borneo and has now been taken to a rescue centre for treatment and rehabilitation.

At only four-years-old, Kotap should still be living with his mother, learning "how to climb and move through the forest, what foods to eat and what to avoid, and how to build a nest in the trees to sleep in each night", said Alan Knight, IAR's Chief Executive.

Kotap was kept by a man called Baco who claimed to have been given the orangutan after spotting him in a cardboard box and agreeing to take him home and look after him.

However, Baco soon became concerned that Kotap would disturb his neighbours, so he built a cage for him.

While orangutans should eat a largely fruit and plant-based diet, Baco fed Kotap a human diet, including bread and rice, claiming his favourite meal was uncooked instant noodles, washed down with a sugary drink.

A diet such as this could have made Kotap seriously ill.

The box Kotap was kept in measured just one metre square. Credit: IAR

When the IAR found Kotap he had just an empty plastic bottle and straw to keep him occupied.

On their first visit to Baco at his home in Rabak, a village in the west of the island, officials from the Indonesian Nature Conservation Agency (BKSDA) were unable to persuade him to give up Kotap.

However, when they visited Baco again, they were able to persuade him and explain the plight of orangutans in Borneo, convincing him that he must act in the best interests of Kotap - and in compliance with the law - and hand him over.

But when the IAR rescue team and officials from the BKSDA opened the door of the box to let Kotap out, he was frightened of the outside world and ran to the back of his box.

Yet the teams persisted and helped to calm Kotap, and he was safely removed and taken to a rescue centre.

Kotap was found with just a plastic bottle and straw to keep him occupied. Credit: IAR

“This poor orangutan had been kept alone in the dark for two long years," said Mr Knight.

"He was deprived of everything that an orangutan needs to survive in the wild.

"Instead, Kotap lived a sad and solitary existence, unable to exercise or behave in any way like a wild orangutan.

"He was fed an unsuitable diet that could have made him seriously ill.

"Thankfully now he will join other rescued orangutans at our centre and be given a chance of returning to the forest where he belongs."

The IAR team take Kotap to a rescue centre. Credit: IAR

Karmele Llano Sanchez, IAR Programme Director, added: "It’s high time people realised that, if they keep breaking the law by capturing orangutans and keeping or selling them as pets, then the species will soon become extinct."