A wild bear was rescued after spending two nights stuck on a 60ft high block of flats which it climbed looking for food.
The Asian black bear cub climbed up the side of the apartment building after being enticed by the smell of food coming from the sixth floor.
Terrified residents called the emergency services after noticing the 60kg animal in Nakhon Ratchasima, northern Thailand.
Wildlife workers spent the next two days trying to entice the cub into climbing down but it remained laid out on the perilously thin bathroom window ledge.
The bear finally climbed back down on Sunday afternoon before running into another condominium. Conservationists finally caught him using a large net and put him in a cage.
Department of National Parks officer Patpon Maneoon, who was involved in the rescue, said: ''This was a young bear so he was quite inexperienced. I don't think an older bear would have tried to do this.
''The youngster was probably trying to get inside one of the rooms looking for food.''
Patpon said that workers from the National Park Rescue Centre, local vets and staff from the Khao Yai National Park helped to bring the bear to safety.
They initially used a large crane to reach the animal and try to coax it down to the ground. They even flew a drone close to it hoping that it would be pressured into scaling back down the edge of the building.
It eventually made the descent just after lunchtime. It was later released back into the wild.