Security video showed the dramatic moment a 27-year-old Texas man saved a small dog whose leash was caught in an elevator door.

Johnny Mathis, 27, was luckily coming home late from work on Monday or he might not have been around when his Pomeranian neighbor was in crisis, he told NBC News Wednesday. Video he recorded from his Houston building's security camera and posted to Twitter has been viewed more than 7 million times.

Mathis was exiting the elevator on the floor to his apartment when a new tenant was walking in with her dog in tow. Video Mathis recorded from his building's security camera showed the elevator doors close on the dog's leash, with its owner inside.

Y’all I’m shaking!!! I just saved a dog on a leash that didn’t make it onto the elevator with the owner before the door closed! I just happened to turn around as the door closed and it started to lift off the ground I got the leash off in time😭😭 — Johnny Mathis (@Johnnayyeee) December 10, 2019

Mathis said he was fueled by pure adrenaline when he ran up to the Pomeranian in an effort to save the dog from getting strangled by its leash as the elevator car went up to the top floor.

"I tried to break it at first," Mathis said. "I tried to lean down on it with all my weight but it wouldn't snap."

Mathis, who works at Houston Welders Supply and teaches welding part-time, then tried to pull the dog's collar off. He noted that the collar had a buckle, rather than some which snap on and off.

"I was fighting all that fur, it took me a few tries because that dog was so fluffy," he said.

Less than 20 seconds after the ordeal began, Mathis managed to get the collar off and grab the dog for its owner.

"I could hear her screaming the whole time," he said.

He then pressed the elevator's button to try and get the dog's owner back, banging on the doors to try and let her know he got her dog.

"She was on the floor with her face covered just bawling her eyes out," Mathis said of the dog's owner when the elevator came back down. "I felt really bad."

Mathis told NBC News he hasn't been able to talk to his neighbor since the incident happened on Monday evening, but that he learned she was new to the building. It seemed to him that she didn't realize the dog, who was on a retractable lead, wasn't behind her because she didn't feel a tug on the leash.

"I really feel bad for the girl, she’s gotten a lot of hate," Mathis said. "I didn’t realize how much backlash there might be for her. We’re all human, things happen like that. It just takes a second for your attention to not be there."

Mathis was unable to provide NBC News with additional information to get in contact with the dog's owner.

The 27-year-old told NBC News that if there's one good thing that can come from the incident, it's that he hopes people pay more attention to their animals on elevators.

"It’s scary, there’s nothing you can do and if you freeze up it can go really bad," Mathis said.