Mel is one lucky Shih Tzu. She was saved from certain death by a neighbor and a building caretaker who happened to be at the right place at the right time.

Mel lives with her owners in a 9th-floor apartment with a balcony in Ribeirao Preto, Brazil. While home alone one day, she was playing on the balcony. She climbed up on the railing and couldn’t find her way back down. She was stuck there and could fall to her death at any moment.

As Joao Augusto walked passed the building, he glanced up at the barking Mel. He knew he needed to do something to avoid imminent disaster.

Joao called out to the building caretaker, Paulo Narciso, who opened the gate and followed him to where Mel was clinging to the rail. The passerby told the other man to get a blanket or towel to catch the dog.

“I didn’t really understand at the time. I opened the gate and went with the man,” Narciso told reporters. “We got there and saw that the dog was curled over the railing and was going to fall. I went up to the flat, but the owner wasn’t home.”

Before a sheet or towel could be fetched, Mel lost her purchase on the railing. She started tumbling the 100-feet to the ground. Joao tried to position himself so he could break her fall. Security footage shows him stretching his arms out and getting ready to catch the dog.

“I asked for a towel or a sheet to help in some way, but there wasn’t enough time. Then, she fell from the ninth floor. I knew that I wouldn’t be able to catch her, but I was aware that I could cushion the fall,” Augusto told reporters. “I was on the floor for a few seconds, but it was from relief. I think that I was in the right place at the right time. I did what I could, the most I could to help. It was a joint effort with the caretaker who acted quickly to help the dog. It was a happy ending.”

Mel slipped from his arms. His body broke her fall inevitably saving her from certain death. The footage also shows Mel glancing back at him, possibly saying “thank you” before dashing off. Then, the towel he requests falls on him as he lays on the ground.

Mel’s owners are grateful to both men for saving their precious dog’s life. They’ve now installed a net on their balcony so she won’t fall off in future.

Thank goodness for the quick-thinking of these two men. Poor Mel, she had to be so afraid as she clung to the balcony railing. Now she can play in safety.