A dog was rescued after it got trapped in a barred window.

A dog

A dog

Animal services in California came to the rescue of the pooch, who got stuck between the bars after it attempted to jump out of the window.

Two officers were called out to remove the window frame but the dog remained wedged in, according to the Riverside County Department of Animal Services spokesman John Welsh.

He told KNBC-TV: "They could not remove the frame from the pooch. The dog had simply wedged himself in too tight."

The dog was taken to a local animal shelter but was able to wriggle free from the bars en route.

A check-up from a vet revealed that the dog had suffered only minor injuries.