Police in Paris have shot a man dead who tried to enter a police station armed with a knife, shouting “Allahu Akbar.” The man was found to be carrying a cellphone and a paper with an Islamic State flag, the Paris prosecutor says.

The man was carrying a butcher's knife and wore a fake explosive vest, AP reported.

He was identified by officials as 20-year-old Sallah Ali. The man was originally from Casablanca in Morocco, and was reportedly homeless at the time of his death.

Ali was identified by his finger prints. He was a convicted thief, having been detained for a group robbery in the south of France in 2013.

The attacker was reportedly not on the radar of anti-terror forces, and police are treating the incident as a case of attempted murder.

"What is very clear from what is known of this person, [he] has no connection with violent radicalization," France's justice minister Christiane Taubira said, adding that Ali might have been a psychologically disturbed person acting on his own.

Further investigations will show whether he had connections with any terror groups, she said.

The shooting took place at the Goutte d’Or police station in Paris’ 18th district. Anna Polonyi, a journalist from the New York Times, witnessed the events unfolding and published a photo of a man lying on the ground outside the building. She also tweeted a photo of what appeared to be a robot inspecting the body.

Police had told the man to "stop" and "move back" before firing twice at the alleged attacker, who immediately dropped to the ground, eyewitness Alexis Mukenge, who saw the shooting from inside another building, told French iTele network.

Another eyewitness said two or three shots were heard, AFP reported. Police sealed off the area.

The man armed with a knife apparently attacked on-duty policemen, with one officer receiving injuries, according to local media reports.

Police union sources told Reuters the knife-wielding attacker was shot and killed.

Fusillade au commissariat de la Goutte d'or, toute la zone est fermée #Barbèspic.twitter.com/XRqe3kyZ8U — Mathieu Rollinger (@MatRollinger) January 7, 2016

There were also reports that the man was believed to have shouted “Allahu Akbar” as he tried to gain entry to the station.

Following the shooting, police found the man had been carrying a sheet of paper bearing an Islamic State (IS, formerly ISIS/ISIL) flag, according to the Paris prosecutor. Police say they also found a handwritten note written in Arabic claiming responsibility for the attack.

"A mobile phone and a piece of paper, on which appear the Daesh flag and a clearly written claim in Arabic, were found on the individual," Francois Molins said, referring to the Arabic acronym for Islamic State, according to Reuters.

The incident comes as Paris marks the first anniversary of the Charlie Hebdo attacks, which killed 12 people on January 7, 2015.

Thursday’s shooting occurred minutes before French President Francois Hollande paid tribute to police officers, who have been killed in the line of duty. He said there would be an unprecedented strengthening of French security, which would include a further 5,000 police officers.

Le quartier de Barbès est bouclé par l'armée et la police pic.twitter.com/zvZ83gxf09 — Jonathan RT France (@Jonathan_RTfr) January 7, 2016

The incident comes less than two months after the Paris attacks on November 13, which killed 130 people. Alain Corvez, a former adviser to the French Interior Ministry, told RT he believes Paris could be subject to more terror attacks in the future.

“What I am sure of is that such attacks could occur again and again because the problem of terrorism is not solved and we have to be very cautious,” Corvez said. “The president is doing his job, but the problem is different. It is not with words that you fight against terrorism.”

Corvez mentioned the 18th district where the attack took place is a mixed area, which is home to people from a number of different nationalities. However, he warned that future attacks could take place anywhere in the capital.

“You can take all these measures to counter these attacks, but there will be places for terrorists to [commit] attacks.”