A man and his dog were safely rescued Sunday, after the pup fell off a cliff and its master followed.

According to a tweet from the San Francisco Firefighters Union, crews were called to Fort Funston Sunday afternoon after the pair got trapped on the cliff face.

SFFD spokesperson Jonathan Baxter says the call reporting the imperiled duo came in at 1:38 p.m. Sunday, regarding an incident on the cliffs near Fort Funston Road and Skyline Boulevard.

Baxter says that dog had fallen over the edge of the cliff, and the dog's male guardian then climbed down in an effort to rescue the canine. Instead, both found themselves trapped on the rock face.

Baxter says firefighters were able to pull both victims to safety. The dog was fine, Baxter says, and the man suffered minor injuries and was treated at the scene.

Related: Helicopter Crew Saves SF Couple Trapped During Abortive Dog Rescue