Human history
When Greece went to war (for example against the Persian Empire), there was an alliance of such city states, against the Persians. There were also many wars between different city states.