From the early days of the Republic , Rome gained strength and frenquently started wars to gain new territory and safeguard its security. Their first major gain was when they captured Veii, the southernmost of the Etruscan cities in 396 BC. Six years later, a Celtic raiding party descended from northern Italy. They defeated the Romans at the River Allia and captured and sacked Rome itself. This did not effect the Romans much as for the rest of the 4th century BC they steadily expanded their political and millitary influence through central Italy. They took over Italy by a astute mixutre of warfare and diplomacy, they used fighting only where necessary.
In 340-338 BC the Romans gained mastery of Latium in the Latin war. They also defeated their erstwhile allies, the Samnites, in the Second and Third Samnite Wars of 327-304 BC and 298-290 BC. This gave them power in the east to Adriatic and southwards to the Bay of Naples. Their next major war was against Pyrrhus, King of Epirus in northwest Greece. In 280 BC, he landed in sourthern Italy with an army of 25,000 men and 20 elephants. Even though Pyrrhus had several victories he was still wasn't able to defeat them so he withdrew back to Epirus five years later. The Romans were able to hold on to sourthern Italy.