Pepys rose to be the Chief Secretary to the Admiralty under Charles II, and later under James II. Although Pepys had no maritime experience, he rose by patronage, hard work and his talent for administration.