Jay served on the U.S. Supreme Court as the first Chief Justice of the United States from 1789 to 1795. In 1794 he negotiated the Jay Treaty with the British. A leader of the new Federalist party, Jay was governor of New York from 1795 to 1801. He was the leading opponent of slavery and the slave trade in New York. His first attempt to pass emancipation legislation failed in 1777 and failed again in 1785, but he succeeded in 1799, signing the law that eventually emancipated the slaves of New York; the last were freed before his death.