Manuel de Godoy (1767-1851) was a Spanish statesman. He was Prime Minister of Spain from 1792 to 1798. He was a lover of Queen Maria Luisa of Parma , wife of King Charles IV. The Queen and Godoy held most of the political power in Spain during the reign of Charles IV. Godoy's disastrous foreign policy led to the abdication of Charles IV in 1805 and the occupation of Spain by Napoleon's armies.