The dog had managed to squeeze itself into a six inch space between two buildings and was unable to move.
Rescuers found the Shar-Pei mix completely stuck and spent an hour freeing him from the tight spot in Cathedral City, California.
The four-year-old dog was pulled out weak and dehydrated but was immediately revived – with a bean-and-cheese burrito.
He was later given the all clear by vets who also gave him the nickname Wally while his owner is traced.
John Walsh, of Riverside County Animal Control, said: ‘Wally got wedged between parallel cinder-block walls.
‘We managed to knock out enough of the blocks to, well, free Wally. He may have been chasing a cat or a rabbit when he got stuck.’