During the 18th century, Ireland was controlled by the minority Anglican Protestant Ascendancy via the Penal Laws, which discriminated against both the majority Irish Catholic population and Dissenters. Mirroring other boroughs around the country, Dundalk Corporation was a 'closed shop', consisting of an electorate of 'freemen', most of whom were absentee landlords of the Ascendancy. The Earl of Clanbrassil controlled the procedures for both the nomination of new freemen and the nomination of parliamentary candidates, therefore disenfranchising the local populace. In the late 18th century, the United Irishmen movement, inspired by the American and French revolutions, led to the Rebellion of 1798. In north Louth, the authorities had successfully suppressed the activities of the United Irishmen prior to the rebellion with the help of informants, and a number of local leaders had been rounded up and imprisoned in Dundalk Gaol. An attack on the military barracks and gaol was planned for 21 June 1798, in order to free prisoners. The attack failed because of a thunderstorm, which dispersed the gathered United Irish volunteers, and two of the jailed leaders - Anthony Marmion and John Hoey - were subsequently tried for treason and hanged.