Niccolo di Bernardo dei Machiavelli, 3 May 1469 – 21 June 1527) was an Italian historian, philosopher, humanist, and writer based in Florence during the Renaissance. A founder 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 and poetry. His personal correspondence is renowned in the Italian language. He was Secretary to the Second Chancery of the Republic of Florence from 1498 to 1512, when the Medici were out of power. He wrote his masterpiece, The Prince, after the Medici had recovered power and he no longer held a position of responsibility in Florence.