The Republic of Dubrovnik was able to preserve its freedom and independence for centuries through skilled diplomacy rather than military might, as it had only a small army. It realized early on that as a small state, it needed powerful allies for protection but had to balance relations between neighbors to remain neutral. Dubrovnik cultivated talented individuals for its diplomacy and sometimes had to use deception to survive as a small player among larger powers. When under Venetian rule from 1205-1358, Dubrovnik was able to maintain some autonomy through agreements that regulated political, economic and trade relations, while expanding its territories through strategic alliances and diplomatic maneuvers.