A morbidly obese macaque nicknamed "Uncle Fatty" by locals in Thailand is finally being released back into the wild after completing a three-month weight-loss boot camp.

The monkey would hang around the Bang Khun Thian district of Bangkok and was fed junk food and sweet treats by tourists until he reached an astonishing 26kg. Macaques normally weigh around 9kg.

In May, officials caught Uncle Fatty after photos of the obese macaque began circulating on social media and fears for his health spread.

"It was not easy to catch him," said Kacha Phukem, the wildlife official who conducted the capture and rescue

"He was the leader of his pack, and when I tried to go in, I had to fight off a flock of them with sticks."

He was taken to a facility to help him lose weight, where he was encouraged to exercise and put on a strict diet of fresh fruit, vegetables and lean protein.

Although he's still pretty hefty – weighing around 24.72kg – he is ready to be released back into the wild.

According to local veterinarians, Uncle Fatty gained so much weight because other monkeys in his pack would also bring him food.

"He had minions and other monkeys bringing food for him but he would also re-distribute it to younger monkeys," vet Supakarn Kaewchot told the Associated Press back in May.

"After he ate food given by humans for a while, he developed a fat mass, which became a type of benign tumor. He is now in critical condition where there is a high risk of heart disease and diabetes."

Kaewchot warned that Uncle Fatty learned his bad eating habits from humans, however.

"I understand that people feel sorry for the monkeys and want to feed them when they see them," Supakarn said. "But please don't feed them food that people like to eat like snacks and soda. It is very bad for their health and the problem is entirely man-made."