PARIS — A man armed with a knife attacked five people in a neighborhood near the Paris Opera, according to the French police, killing one and wounding four, two of them seriously.

Hours later, the Islamic State claimed responsibility, describing the attacker as a “soldier of the Islamic State.” President Emmanuel Macron called the assailant, who was killed by the police, a “terrorist.”

The Paris prosecutor’s office, which handles all terrorism cases, is taking over the investigation. The prosecutor, François Molins, gave a brief news conference near the scene of the attack. He confirmed that the attacker, whose name has not yet been released, had shouted “Allahu akbar,” Arabic for “God is Great,” during the assault.

On Sunday morning, a French judicial official said that the suspect had been a naturalized French citizen who was born in 1997 in the Russian republic of Chechnya, and that his parents had been taken into custody for questioning.