The Samnites were a people of Sabellic lineage who moved between the valleys of the river Volturno and river Calore. They superseded the Etruscans in the domain of internal Campania, in 421 they conquered Cuma and Dicearchia (now Pozzuoli), while Naples managed to avoid the military occupation.
Samnites expansionism collided with the Roman one, likewise seeking the conquest of Naples, as important port of the Mediterranean.
In the clash between Samnites and Romans, Cuma sided with Rome, (getting in 338 Roman citizenship without, however, the opportunity to vote.) Naples instead remained pro-Samnites and at the end of the war, following the victory of the Romans, in 326 it was militarily occupied. At the end of the clash, the whole phlegrean area was in Romans’ hands.
Naples managed to “trade” its own autonomy with the promise to provide its fleet in case of need, to the Roman Empire.
In 264 the Romans undertook the expedition to Sicily and Naples had to remain faithful to the previously agreed covenant. From this collaboration Naples came out with advantage, being able to do business where the strong Roman military penetration opened some gates!