He served until being replaced by James M. Comly on September 25, 1877. On November 17, 1877 he arrived in San Francisco, but the cold weather convinced him to return to Hawaii January 8, 1878. As he was about to leave, Kalākaua offered him the post of Minister of Foreign Affairs for the Kingdom of Hawaii on March 1. There was a shortage of experienced politicians and diplomats willing to serve; in fact, the Minister from the Kingdom to the United States was fellow New Englander Elisha Hunt Allen. Americans were negotiating on both sides of the 1875 treaty. Allen also was chief justice of the Hawaii Supreme Court.