Roman government was headed by two consuls, elected annually by the citizens and advised by a senate composed of appointed magistrates. As Roman society was very hierarchical by modern standards, the evolution of the Roman government was heavily influenced by the struggle between the patricians, Rome's land-holding aristocracy, who traced their ancestry to the founding of Rome, and the plebeians, the far more numerous citizen-commoners. Over time, the laws that gave patricians exclusive rights to Rome's highest offices were repealed or weakened, and leading plebeian families became full members of the aristocracy. The leaders of the Republic developed a strong tradition and morality requiring public service and patronage in peace and war, making military and political success inextricably linked. Many of Rome's legal and legislative structures (later codified into the Justinian Code, and again into the Napoleonic Code) can still be observed throughout Europe and much of the world in modern nation states and international organizations.
During the first two centuries of its existence, the Roman Republic expanded through a combination of conquest and alliance, from central Italy to the entire Italian peninsula. By the following century, it included North Africa, most of the Iberian Peninsula, and what is now southern France. Two centuries after that, towards the end of the 1st century BC, it included the rest of modern France, Greece, and much of the eastern Mediterranean. By this time, internal tensions led to a series of civil wars, culminating with the assassination of Julius Caesar, which led to the transition from republic to empire.
The exact date of transition can be a matter of interpretation. Historians have variously proposed Julius Caesar's crossing of the Rubicon River in 49 BC, Caesar's appointment as dictator for life in 44 BC, and the defeat of Mark Antony and Cleopatra at the Battle of Actium in 31 BC. However, most use the same date as did the ancient Romans themselves, the Roman Senate's grant of extraordinary powers to Octavian and his adopting the title Augustus in 27 BC, as the defining event ending the Republic.
The exact causes and motivations for Rome's military conflicts and expansions during the republic are subject to wide debate. While they can be seen as motivated by outright aggression and imperialism, historians typically take a much more nuanced view. They argue that Rome's expansion was driven by short-term defensive and inter-state factors (that is, relations with city-states and kingdoms outside Rome's hegemony), and the new contingencies that these decisions created. In its early history, as Rome successfully defended itself against foreign threats in central and then northern Italy, neighboring city-states sought the protection a Roman alliance would bring. As such, early republican Rome was not an "empire" or "state" in the modern sense, but an alliance of independent city-states (similar to the Greek hegemonies of the same period) with varying degrees of genuine independence (which itself changed over time) engaged in an alliance of mutual self-protection, but led by Rome. With some important exceptions, successful wars in early republican Rome generally led not to annexation or military occupation, but to the restoration of the way things were. But the defeated city would be weakened (sometimes with outright land concessions) and thus less able to resist Romanizing influences, such as Roman settlers seeking land or trade with the growing Roman confederacy. It was also less able to defend itself against its non-Roman enemies, which made attack by these enemies more likely. It was, therefore, more likely to seek an alliance of protection with Rome.
This growing coalition expanded the potential enemies that Rome might face, and moved Rome closer to confrontation with major powers. The result was more alliance-seeking, on the part of both the Roman confederacy and city-states seeking membership (and protection) within that confederacy. While there were exceptions to this (such as military rule of Sicily after the First Punic War), it was not until after the Second Punic War that these alliances started to harden into something more like an empire, at least in certain locations. This shift mainly took place in parts of the west, such as the southern Italian towns that sided with Hannibal.