A 10-year-old boy is earning praise from one of Hollywood’s biggest movie stars, for using a life-saving technique he learned watching one of the actor’s films to rescue his younger brother.

Jacob O’Connor discovered his two-year-old brother Dylan floating face down in his grandmother’s swimming pool in Roseville, Mich. on July 25. He had been watching television while his younger brother was in the kitchen with their grandmother.

The boys’ mother, Christa O'Connor, told CTVNews.ca on Friday that she had been away at work that day while her mother looked after her three sons.

When the boys’ grandmother stepped out of the kitchen for a moment, Jacob checked in on his younger brother.

“He’s always peeking on him,” O’Connor said. “He [Jacob] was in the kitchen and he went back to watching his show and when he peeked in the kitchen again, both doors were open.”

Little Dylan had somehow managed to open the kitchen door and unlatch the screen door to enter the backyard, O’Connor said. The toddler walked up the deck and opened the gate of a small privacy fence in order to make his way to the pool.

“My two-year-old is obsessed with water,” O’Connor explained. “If he knows that there is a pool in the backyard, he’s clearly adamant to get to it and he will figure it out.”

O’Connor said she thinks Dylan learned how to open and shut the doors by watching the rest of the family do it multiple times.

Luckily, Dylan’s observant older brother noticed his absence in the kitchen and followed him out to the backyard. When he spotted Dylan in the pool, the quick-thinking 10-year-old immediately jumped in the water and pulled his brother out, O’Connor said.

Without missing a beat, Jacob gave his unconscious brother chest compressions for CPR until Dylan spit up some of the water he had swallowed. He later told his mother that he knew how to do them because he watched actor Dwayne “The Rock” Johnson administer chest compressions to his on-screen daughter during a rescue scene in the movie San Andreas.

“Jacob said when he saw Dylan he had just like a flash of that specific scene in the movie and followed through with what he had saw,” O’Connor said.

San Andreas is one of Jacob’s favourite movies, his mother said. In fact, he had just re-watched it only a week or so before the accident happened, she said.

Once Dylan spit up some of the water, Jacob ran to grab his grandmother who gave Dylan mouth-to-mouth resuscitation while they waited for an ambulance to arrive. O’Connor met up with her family at the hospital soon after.

“When I saw Dylan, he had an IV coming out of both arms and he was on oxygen and he was unconscious,” she recalled.

O’Connor said Jacob was shaken up by what had happened to his brother when she found him at the hospital that day.

“I went to see Jacob and the first thing I did was give him a huge hug and he just cried.”

Eventually, Dylan woke up and O’Connor said the doctors told her he would be okay and that there wouldn’t be any lasting damage.

“He’s back to his normal little self. A little bundle of energy he is,” O’Connor said. “The next day he wanted to go swimming!”

Less than a month later, O’Connor said she decided to share her story with the local paper. As word of her son’s heroic actions quickly spread, the O’Connor family received an exciting piece of news on Thursday.

The Rock himself tweeted out a message to his 11.7 million followers commending Jacob for saving his brother’s life.

“Wow amazing story. Giving you a Twitter [high five emoji] Jacob for saving your little brother's life. You're a real life hero. We're all proud of you!”

Jacob was shocked and thrilled when his mother showed him a screen shot of The Rock’s Twitter shout out to him. She is still trying to take it all in herself, she said.

“It’s overwhelming,” O’Connor said. “Sometimes it takes a minute to go, ‘Oh whoa. This is really happening.’”

Now that they have The Rock’s attention, O’Connor said she hopes her son will be able to meet the popular action star in person one day soon.

“That’s my goal,” she said with a laugh. “I want to get a meet and greet with The Rock.”