Police say the suspect, a 37-year-old man, was taken into custody shortly after the attack in the city’s southwest.
Three people have been killed and 15 others injured in a knife attack at a suburban supermarket in Shanghai, China’s biggest city.
The attack took place on Monday in the city’s southwest, the latest in a series of stabbing incidents in major Chinese cities this year.
The suspect, a 37-year-old man surnamed Lin, was taken into custody shortly afterwards by police responding to the attack, the local Songjiang police branch said in a statement on Tuesday.
Early investigations suggested Lin had travelled to Shanghai to “vent his anger” following a personal financial dispute, police added.
The knife attack took place as China prepared for the traditional “Golden Week” holiday, which falls around national day on October 1.
Public stabbing incidents have risen over the years in China, with authorities often putting the blame on mental illness.
Last month, a 10-year-old Japanese schoolboy was stabbed in the southern city of Shenzhen and died of his injuries.
In May, a man killed eight people and injured one more with a knife in the city of Xiaogan in central Hubei province.
In 2022, a man went on a stabbing spree at a major hospital in Shanghai, injuring 15 people.
He was later sentenced to death.