PARIS (AP) — President Emmanuel Macron on Monday lauded as a hero a migrant who scaled an apartment building to save a young child dangling from a balcony, and rewarded him with French nationality and a job as a firefighter.

"Bravo," Macron said to 22-year-old Mamoudou Gassama during a one-on-one meeting in a gilded room of the presidential Elysee Palace that ended with Gassama receiving a gold medal from the French state for "courage and devotion."

Gassama's feat went viral on social media, where he was dubbed "Spiderman" for climbing up five floors, from balcony to balcony, and whisking a four-year-old boy to safety Saturday night as a crowd screamed at the foot of the building in Paris' northern 18th district.

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

Gassama, dressed in tattered blue jeans and white shirt, recounted his experience which took place at around 8 p.m. Saturday when he and friends saw a young child hanging from a fifth-floor balcony.

"I ran. I crossed the street to save him," he told Macron. He said he didn't think twice. "When I started to climb, it gave me courage to keep climbing."

God "helped me," too, he said. "Thank God I saved him."

Gassama said he began to tremble with fear only when he took the child into the apartment.

"Because this is an exceptional act ... we are obviously, today, going to regularize all your papers," Macron told him, also offering to begin naturalization procedures so he can become French.

Macron is behind a bill toughening French immigration law, and he stressed there is no contradiction between rewarding Gassama for his act of bravery and holding firm on immigration, which the president wants to stop at its source.

"An exceptional act does not make policy," he later told reporters, vowing to maintain a policy that is "exigent, respectful of our principles" on asylum and "rigorous" regarding the migratory flux.

The special treatment for Gassama comes as authorities prepare to evacuate some 2,400 migrants in makeshift encampments in the French capital, the subject of a heated debate between the Paris mayor, who wants to ensure the uprooted will be sheltered, and Interior Minister Gerard Collomb, who was present at the Elysee.

Gassama told Macron that he arrived in Italy in 2014 after more than a year in Libya, where he was arrested and beaten, "but I wasn't discouraged."

The father of the child was detained overnight for alleged parental neglect, and is to appear in court in September. He left the child alone while he shopped, then lingered to play Pokemon Go, Prosecutor Francois Molins told BFM-TV. The whereabouts of the child's mother were unclear.

The French president said Gassama's actions made him deserving of special treatment.

"You saved a child. Without you, no one knows what would have become of him," the president said. "You need courage and the capability to do that."

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.

Another Malien, Lassana Bathily, was given French citizenship in January 2015, shortly after saving lives during a terror attack on a Jewish grocery where he worked, hiding people in the freezer and then alerting police.

___

An earlier version of this story corrected the 9th paragraph to use naturalization, instead of nationalization.