Two men pulled up alongside a car and threatened its occupants with a crowbar, but they soon discovered that a police firearms team was inside the vehicle.
The men drove off along Waterfront Way, Brierley Hill, but police caught up with them.
Two men have been arrested on suspicion of possession of an offensive weapon.
One inspector tweeted on Saturday he was still "chuckling" and added: "I'd love to have seen their faces."
Allow Twitter content?