CNN  — 

The father of a young child dramatically rescued from a Paris balcony Saturday was out playing Pokemon Go when the incident happened.

In an interview with CNN affiliate BFM TV Monday, French prosecutor Francois Molins said the four-year-old’s father had gone out shopping, leaving the child at home alone. His return to the apartment was delayed when he decided to start playing the smartphone game on the way back.

According to Molins, the toddler was being looked after by his father in Paris while his mother was living on Reunion Island, a French-administered territory in the Indian Ocean.

Video of the rescue went viral over the weekend, after young Malian migrant Mamoudou Gassama climbed four floors on the outside of an apartment building to save the dangling child. He has now been offered French citizenship and a job with the Paris fire brigade.

According to Molins, the father, who faces up to two years in prison for abandoning his parental responsibilities, is devastated by the consequences of his actions. He will be sentenced in September, according to Bruno Badre, a spokesman for the Paris prosecutor.

Badre told CNN Tuesday that the boy had been placed in temporary care while the father was in custody, but the two have now been reunited.

French President Emmanuel Macron (L) speaks with Mamoudou Gassama, 22, from Mali, at the presidential Élysée Palace in Paris, on May 28.

‘I would have hated to see him getting hurt’

During a visit Tuesday to the Paris fire brigade that has offered him a job, Gassama, 22, told CNN that he was feeling “really, really good.”

Speaking to BFM TV shortly after the rescue, he explained that he had been in the neighborhood to watch a football match when he saw the crowd gathering.

“I like children, I would have hated to see him getting hurt in front of me. I ran and I looked for solutions to save him and thank God I scaled the front of the building to the balcony,” he said.

Gassama took less than 30 seconds to reach the boy, using the railings on each balcony to pull himself up to the next floor.

He later told French President Emmanuel Macon, who invited Gassama to the Elysee Palace to thank him personally, that the decision to climb the building had been a spontaneous one.

“I didn’t think about it, I climbed up and God helped me,” he said.

In the video, cheers broke out when the young migrant reached the dangling child and pulled him over the balcony before Parisian emergency services could arrive. French media quickly dubbed Gassama ‘Spider-Man.’

Flanked by his older brother, Gassama holds his temporary residence permit after receiving it Tuesday.

‘He had extraordinary courage’

The video also shows how, shortly after Gassama begins his ascent, a man in the apartment next to where the boy is hanging steps onto his balcony. He reaches across and grabs hold of the child.

Responding to accusations that he could have done more to help, the neighbor – named as Florian – told BFM TV Tuesday that he feared the boy might fall if he tried to bring him over to his balcony, which is separated from the adjacent one by a wall.

“I wanted to act carefully above all and I certainly did not want to risk the child’s life,” he said. Florian said he was encouraging the child to edge closer to him. “I was talking to him at the same time, I was telling him, ‘Come up slowly,’” he said, adding: “He had extraordinary courage.”

Florian also said that the boy had first fallen from one of the floors above, before “by miracle” grabbing onto the fourth-floor balcony.

Neighbor Jerry Alfred told CNN Tuesday that the father and son lived on the sixth floor of the building.

Praise from French leaders

French President Emmanuel Macron invited Gassama to the Elysee Palace on Monday where he presented the young man with a certificate and a gold medal for performing an act of courage and determination.

Gassama spoke to Macron about the rescue and about his difficult journey to France from his home country Mali. Speaking to BFM TV he explained how he traveled through Burkina Faso and Nigeria before crossing the Mediterranean in an overcrowded boat from Libya and finally arriving in France.

Paris Mayor Anne Hidalgo said on her official Twitter on Sunday that she had called Gassama to thank him for his act of bravery.

“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.

CNN’s Judith Vonberg contributed to this report