A cat had to be rescued by firefighters after becoming trapped in a 7cm (3in) wide gap between a garage and wall.
Crews had to remove bricks from the garage to free the animal at Conybeare Road, Sully, Vale of Glamorgan.
The RSPCA was alerted to its plight on Monday morning but it is thought the cat may have become stuck overnight.
"I could reach my hands to him but there was no room to get him out," RSPCA inspector Sophie Daniels said.
"This cat was certainly well and truly stuck and could only move his head."
She praised the fire crew from Barry for their efforts, along with the homeowner who allowed them to "knock through their garage wall to rescue this poor cat".
"Once he was out, I immediately scooped him up and took him to the vets for treatment where he has been placed on a heated blanket," she said.
"Hopefully, after some rest and TLC, he'll feel a lot better."
The RSPCA is appealing for help to trace the owner of the black and white cat which has not been microchipped.