I once read an autobiography of a Mafia member where he said that if the US was ever invaded, the mob would fight the invaders. Has there ever been a situation like this (obviously not in the US, but elsewhere)?

by Obligatory-Reference
Georgy_K_Zhukov

To clarify, what exactly are you asking? Specifically whether the Mafia has operated as a paramilitary organization against foreign invasion, or whether any criminal organization has done so?

If the latter, unfortunately this violates our "throughout history". If the former, I would suggest asking the question over with more clarity, if not specificity. Perhaps, "How did the Italian Mafia operate during World War II?" or if you want to ask about France, the Unione Corse.