The Spartan government was much admired by contemporaries. It consisted of monarchical, oligarchical, and democratic elements, which made it a mixed constitution. Monarchial, two kings served as head of the government. One each was drawn from the prominent families of the Agiads, and the Eurpontids. This system reflects an effort to resolve the tensions that arose when the villages united to form the town of Sparta. The two kings were competitive with one another, but equal in authority, and served as a mutual check on the power of the monarchy. Sparta was "never without a leader" which avoided an anarchy. Spartan kings exercised military, religious, and judicial powers. During war, one king served as a commander -in-chief of the armed forces, while the other supervised domestic matters at home and became in charge if his co-king was killed. Kings were not mere figureheads, but were important leaders who contributed to the military effeteness of the country.