 However, he was elected at an unopposed by-election
in March 1801 as MP for Portarlington, and held that seat until the 1802 general election, when he was returned to the House of Commons of the United Kingdom for the English borough of Peterborough.He held that seat until his death in October 1818, aged 52.He was sworn as a Privy Councillor in March 1806, in Dublin Castle,
and appointed on 28 March as Chief Secretary for Ireland in the Ministry of All the Talents.