He rose to the position of Lord Chief Justice (1613), prosecuting such defendants as Essex (1601) and the Gunpowder Plot conspirators (1606). In 1616 James I dismissed him, since, at first a supporter of the royal prerogative, Coke had become a defender of the common law against church and crown: as a Member of Parliament he led opposition to James I and Charles I. He was largely responsible for drafting the Petition of Right (1628) and wrote commentaries on medieval and contemporary English law.