Europe had them in the middle ages too: Italy's seafaring republics (Venice, Genoa, Amalfi, Pisa et al) where (nominal) democracies, practically owned the Mediterranean sea and lasted a thousand years.
https://en.m.wikipedia.org/wiki/Maritime_republics