The first American diplomat was consul general Townsend Harris, who was present in Japan from 1856 until 1862 but was denied permission to present his credentials to the Shōgun until 1858. He successfully negotiated the Treaty of Amity and Commerce, or the "Harris Treaty of 1858," securing trade between the two nations and paving the way for greater Western influence in Japan's economy and politics. He was succeeded by Robert H. Pruyn, a New York politician who was a close friend and ally of Secretary of State William Henry Seward. Pruyn served from 1862 to 1865 and oversaw successful negotiations following the Shimonoseki bombardment.