Think of a seaside city that thanks to its prosperity is autonomous and able to arm warships to defend its port and its trade. That so can expand its influence, its independence and therefore its strength.
You will get the formula put in place by the Maritime Republics to dominate the Mediterranean alternately between the 10th and 13th centuries AD.