A heroic shopper stepped in to save the lives of terrified locals at a Walmart after a deranged knifeman stabbed 11 people in a 'terror' rampage.

The man, identified as former Marine Derrick Perry, pulled out a concealed firearm and held knifeman Bradford James Gille at gunpoint until officers arrived at the scene.

The 42-year-old Gille had already stabbed 11 people inside the Michigan Walmart and is facing charges of terrorism and assault with intent to murder, according to Grand Traverse County Prosecutor Noelle Moeggenberg.

But bystanders credited Perry for potentially saving the lives of many more shoppers. His intervention stopped Gille in his tracks and gave frightened onlookers a chance to flee.

Supporters online praised Perry for carrying a concealed firearm and being prepared to use the weapon responsibly.