MIAMI (CBS4) – A man is accused of trying to kidnap a 4-year-old boy, but another child came to the rescue.

On Tuesday afternoon, when 4-year-old Brandin was playing outside his Miami home, police say he came face to face with 39-year-old David Moore.

READ MORE: ‘I Have Goose Bumps’: Zoo Miami's Ron Magil On 'Rita' Laying 2nd Egg On Live Bald Eagle Cam

Brandin’s grandmother, Phyllis Singleton, said Moore grabbed Brandin.

“He said God told him to take him, he wasn’t letting him go,” said Singleton.

Singleton and police say Moore claimed God told him to kidnap Brandin.

“He picked Brandin up. He had him, holding him. He was going to take him with him,” she said.

That’s when an unlikely hero came to the rescue. Brandon’s cousin, 7-year-old A-Nari, heard the commotion.

“I thought it was upstairs, but we saw the man and he said, God told me to take you,” said A-Nari. “And I had to fight the man so he can let Brandin go.”

READ MORE: Boca Raton Man Faces Charges In Fatal Crash That Killed Homestead Mom, Daughter On Thanksgiving Eve

A-Nari said Brandin was in shock.

“He wasn’t saying nothing. He was shaking,” said A-Nari.

Moore let Brandin go and neighbors called police.

A-Nari’s mother, Tanya, is proud that her daughter took action.

“She stood up, she’s only seven years old,” she said.

Police found Moore and arrested him. In bond court, a judge asked him what he owns.

“My soul,” he said.

MORE NEWS: Kyle Lowry Scores 19 Points, Heat Beat Bulls 107-104

Now Moore is behind bars facing attempted kidnapping charges, a 4-year-old is safe at home, and a community embraces a child hero.