(CNN) A man saved his neighbor's dog after its leash got caught in an elevator door on Monday and their apartment security cameras captured the rescue.

Johnny Mathis, 27, was coming home from work in Houston, Texas and had just parked his car in his apartment complex's underground garage. Mathis lives on the ground floor of his community so he took the elevator up to his floor. As soon as he got off, a woman and her dog were trying to get on.

"When she got on, I was looking at the dog, because it was a cute dog," Mathis told CNN. "I noticed the leash was kinda long but I didn't think it wasn't going to make it on the elevator or anything."

In the 39-second clip Mathis posted on Twitter , you see him leaving the elevator but quickly coming back to pick up the Pomeranian once he saw the owner was gone and it was still stuck there alone.

Mathis said he yelled back to her, "hey your dog!" when he noticed the Pomeranian didn't make the elevator.

Read More