In 1714 Gay was appointed secretary to the Earl of Clarendon the new British ambassador to the Electorate of Hanover through the influence of Swift. However the death of Queen Anne, three months later put an end to all his hopes of official employment. The mission had been an unsuccessful attempt by the Tories to ingratiate themselves with Elector George, heir to the throne, who was angry that the Peace of Utrecht had led to Britain abandoning its allies in the war against France and suspected that the Tory leadership favoured the Jacobites.