A young Malian immigrant is being praised in France after scaling up four floors of a multi-level building to rescue a young child.

>> Read more trending news

CNN reports the 22-year-old Mamoudou Gassama said he was about to watch a football match at a nearby restaurant when he saw a group of people yelling and heard cars honking.

His heroic actions went viral on social media after he scaled an apartment building to rescue the child.

"I saw the child who was about to fall from the balcony. I like children, I would have hate to see him getting hurt in front of me. I ran and I thought of ways to save him. Thank God I scaled the front of the building to that balcony," said Gassama. "I got on the top of a door and I managed to pull myself from balcony to balcony. And thank God, I saved him."

French President Emmanuel Macron met Monday with a migrant from Mali lauded as a hero for scaling an apartment building to save a young child dangling from a balcony. Macron said 22-year-old Mamoudou Gassama would be rewarded for his “exceptional act” with papers to legalize his stay, citizenship if he wants and a job as a firefighter.

Working as a firefighter corresponds with his skills, Macron said, and opened the door for him to join.

“You have become an example because millions have seen you” on social media, the president said.

The young man said he has papers to legally stay in Italy, where he arrived in Europe after crossing the Mediterranean after a long, rough stay in Libya. But he wants to join his older brother, who has lived in France for decades.

The French media reported that the father of the small child was detained for alleged parental neglect.

The Associated Press contributed to this report.