After overthrowing the Etruscan kings, Rome established a republic run by an aristocratic Senate made up of patricians. Power struggles emerged between the patrician nobles and plebeian commoners. The republic had two consuls as both military commanders and heads of state, and in emergencies a dictator could be appointed for six months. Plebeians gained some political power through military tribunes and assemblies. Laws were established in the Twelve Tables.