"The executor of the stabbing operation in the city of Surgut in Russia is a soldier of the Islamic State," ISIS propaganda outlet Amaq said in a statement, after the jihadists also claimed responsibility for twin attacks in Spain that left 14 dead.
The attack also comes a day after a stabbing spree in Finland, which left two people dead and eight others injured and is being investigated as a terrorist attack, although the assailant's motive is unknown.
Russia's Investigative Committee, which probes major crimes, said a man in Surgut had "carried out attacks on passers-by, causing stab wounds". It said armed police called to the scene "liquidated" the attacker following the stabbing on Saturday morning.
Regional officials said seven people were taken to hospital, with the figure confirmed by investigators, who lowered an earlier toll of eight wounded.
A spokesman for regional police had earlier downplayed the possibility of a terrorist incident, telling Interfax news agency that the theory that the incident was "a terrorist (attack) is not the main one".
The Investigative Committee said it had established the attacker's identity, saying he was a local resident born in 1994, and that they were looking into "his possible psychiatric disorders".
Opposition leader Alexei Navalny questioned the authorities' treatment of the incident, writing on Twitter: "Someone runs round with a knife and tries to kill as many people as possible. What is that, if not a terrorist attack?"
Investigators have opened a criminal probe into attempted murder, not terrorism, with the Investigative Committee's chief Alexander Bastrykin taking the case under his personal control.
Regional police said officers fired warning shots at the scene before firing at the suspect, who was wearing a balaclava.
YouTube footage shown on Russia's Ren TV television showed a black-clad man lying on a pedestrian walkway with a policeman kneeling on his back as sirens wail.
Unconfirmed reports from the Komsomolskaya Pravda tabloid and other media identified the attacker as 19-year-old Artur Gadzhiyev, saying that his father is known to authorities for involvement in radical religious organisations and comes from the mainly Muslim region of Dagestan in the North Caucasus.
Regional officials said four of those stabbed remained in a serious condition while another was stable in hospital. Two have already been discharged.
Russian television reported that the stabbing victims are aged between 27 and 77 and include two women.
State news agency TASS said the city's largest shopping centre was evacuated after the stabbings, citing its director, and police posted a video of the attack site, showing it to be a busy area with traffic and blocks of flats.
The city lies some 2,100 kilometres (1,330 miles) northeast of Moscow in the oil-rich Khanty-Mansi region.
The region's governor was flying out to the city to hold a meeting with investigators, regional authorities said.
The regional government moved to curb panic in the city, insisting the "situation is under the control of the authorities" and calling for calm.
A group suspected of links to Al-Qaeda claimed an April attack on the Saint Petersburg metro that killed 15 people and has been blamed on a Russian suicide bomber born in the Central Asian country of Kyrgyzstan.