Voltaire, who had been imprisoned and maltreated by the French government, was eager to accept Frederick's invitation to live at his palace.