Giulio Genoino (born c. 1565 in Cava de' Tirreni), the 'mind of Masaniello', was a key figure in the 7 July 1647 popular insurrection against Habsburg authority in Naples. A priest, lawyer, and academic, Genoino had for three decades attempted to influence constitutional change to involve the Third Estate in the government of the city. Despite being a representative of the king to Naples, he was accused of spreading sedition and instigating riots during unrest in 1585 and 1620. After periods of imprisonment and exile, and then in his 80's, he returned to Naples and began advising the fisherman and smuggler Tommaso Aniello—later known as Masaniello—a popular figure among the city's populace. Genoino was the real power behind the popular movement, and supplied the directionless and illiterate Masaniello with advice and a coherent policy. Following the uprising of 7 July, and the assassination of Masaniello on 16 July, the Viceroy attempted to restore order by handing governance of the city to Genoino. He was unable to resist the most extreme demands of the populace. Following a second revolution in August, Genoino was exiled and the Neapolitan Republic proclaimed.