Written between 1519 and 1520 and published the following year, it was Machiavelli's only historical or political work printed during his lifetime, though he was appointed official historian of Florence in 1520 and entrusted with minor civil duties.