Massalia was able to retain its independence from the Roman empire for the first 5 centuries of its existence. But local conflicts with the Celts, common ennemies (like Carthage), and the declining of Athens made their allegiance to Rome a necessity.
In exchange of ships provision and military aids, Ceasar would grant them protection yet leave their independence untouched. A pledge that Caesar would capitalize on, most notably during the Punic Wars (between 264 and 146 BC).