It took less than a minute of extreme bravery for Mamoudou Gassama, a Malian migrant, to scale the façade of a Paris building and save a four-year-old boy clinging to the edge of a balcony for dear life.

Barely 24 hours later, the 22-year-old’s spectacular fourth-floor rescue earned him an invitation to the Elysée Palace, where President Emmanuel Macron on Monday hailed his “courage and devotion” and offered him French nationality and a job as a fireman.

His feat highlights the quandary facing Paris in dealing humanely with a migrant influx that homeless charities this month warned risked ending in tragedy, after two refugees drowned in canals and a third was stabbed.

France has been transfixed by video footage of the Malian’s exploits, which has been viewed millions of times on social media and turned Mr Gassama into an overnight celebrity with the nickname “Spider-Man”.

The film shows a crowd cheering on Mr Gassama from the street as he pulls himself from balcony to balcony with his bare hands.

With a neighbour in the apartment block in Paris’s multi-ethnic 18th arrondissement unable to reach the boy, Mr Gassama manages to grab the four-year-old, who it appears climbed on to the balcony after being left alone by his father. The crowd goes wild.