After the expulsion of the Carthaginians from Hispania in the Second and Third Punic Wars, Rome attempted to subdue the native tribes. In the northeasterly province of Hispania Citerior, the Celtiberian Wars occupied Roman forces for the better part of the 2nd century. In Hispania Ulterior, the Lusitanian War did the same. The resistance of the Lusitani under Viriathus became legendary across the Empire. In the troubled final years of the Republic, Quintus Sertorius held most of Iberia as a "de facto" independent sovereign against the partisans of Sulla. His attitude towards the natives and his military reforms – he was a partisan of Marius – secured him the loyalty of the populace and the army and his general success until his assassination. The Spanish era, a dating system predominant in Iberia until the close of the Middle Ages, began in 38 BC. The last region of Hispania to be subjected was the northwest, finally being conquered in the Cantabrian Wars, which ended in 19 BC.