Trives, alcalde y xefe militar