The 17-year-old was travelling through Swindon town centre at roughly 2pm carrying a knife when Easter shoppers wrestled him to the ground.
Witnesses described seeing a man being held on the floor by police officers near to the Metro Bank building as several people watched it happen. A moped was strewn on the floor nearby.
Police officers quickly arrived on the scene where the armed youth was arrested on suspicion of affray, possession of a bladed article in a public place and possession of a class B drug.
A spokesperson from Wiltshire Police confirmed the incident and subsequent arrest and praised the members of the public for their quick thinking.
“We were called to the Parade, in Swindon town centre at just after 2pm this afternoon to reports of a man carrying a knife,” they said.
“He was detained by members of the public before our officers arrived on the scene.
“A 17-year-old boy has been arrested on suspicion of affray, possession of a bladed article in a public place and possession of a class B drug.
“We would like to thank the bravery and quick thinking of those members of the public who stepped in to detain the suspect.”