SALT LAKE CITY — Video of a man rescuing a 4-year-old child in France went viral Monday.

Malian migrant Mamoudou Gassama climbed four floors of banisters outside an apartment building in Paris to rescue the dangling child, who was hanging off one of the balconies.

Mamoudou Gassama, the 22-year-old undocumented immigrant from Mali who scaled four stories to rescue a child hanging from a balcony in Paris on Saturday, has been given a medal of courage from French president Macron and will be awarded French citizenship. https://t.co/oQiszSBHuc — Keith Boykin (@keithboykin) May 28, 2018

The child’s father was out playing Pokemon Go at the time of the incident, CNN reported.

French prosecutor Francois Molins said the father went shopping and then decided to play the mobile game.

The father had been watching over the child while the boy’s mother was living on Reunion Island.

Gassama received French citizenship and a job for his efforts saving the boy’s life, according to BBC News. On Monday, he also met with French President Emmanuel Macron, who awarded Gassama a gold medal.

"I just didn't have time to think, I ran across the road to go and save him,” he told Macron, according to BBC.

He added, "I just climbed up and thank God, God helped me. The more I climbed the more I had the courage to climb up higher, that's it.”

Paris Mayor Anne Hidalgo also spoke with Gassama, according to her official Twitter account. She called him “Spiderman of 18th,” which a reference to the area in Paris where the heroic move took place, BuzzFeed UK reported.

Cet homme aussi téméraire que courageux a sauvé la vie d’un enfant au péril de la sienne. Je souhaiterais, comme nombre de Parisiens, savoir qui est le Spiderman du 18ème pour le féliciter.

https://t.co/nagKekpL9O — Anne Hidalgo (@Anne_Hidalgo) May 27, 2018

Un grand bravo à Mamoudou Gassama pour son acte de bravoure qui a permis de sauver hier soir la vie d'un enfant. J'ai eu plaisir à m'entretenir avec lui aujourd'hui par téléphone, afin de le remercier chaleureusement. https://t.co/DP5vQ1VZYh — Anne Hidalgo (@Anne_Hidalgo) May 27, 2018

"He explained to me that he arrived from Mali a few months ago with the dream of making a life for himself here. I replied that his heroic act is an example for all citizens and that the city of Paris will obviously be keen to support him in his efforts to settle in France," she tweeted.