Niccolò di Bernardo dei Machiavelli was an Italian historian, philosopher, humanist, and writer based in Florence during the Renaissance. He is one of the main founders of modern political science. He was a diplomat, political philosopher, playwright, and a civil servant of the Florentine Republic. He also wrote comedies, carnival songs, poetry, and some of the most well-known personal correspondence in the Italian language. His position in the regime of Florence as Secretary to the Second Chancery of the Republic of Florence lasted from 1498 to 1512, a period in which the Medici were not in power. Machiavelli's most well-known writing was, however, after this period, during the time when the Medici recovered power, and Machiavelli was removed from all positions of responsibility.