A man was arrested after beheading another person in broad daylight on a street in the Egyptian city of Ismailia, the Interior Ministry said on Tuesday.
Videos of the killing were widely shared on social media, which also showed there were people nearby.
Screams can be be heard on the video.
The ministry said the killer was "psychologically unstable." He attacked a man and cut his head off with a large knife and was saying incomprehensible words.
He worked at a furniture shop owned by the victim's brother and was previously treated for drug addiction at a rehabilitation facility, the ministry added in a statement on Monday.
Two people injured
The prosecutor ordered a rapid investigation into the incident. A team went to Ismailia, north-east of the capital Cairo, to investigate the scene and the dead body.
The attack also left two people injured, the prosecutor said.