His father was captain and part owner of a vessel trading to the Mediterranean, which, during a voyage in 1794, was captured by the French and taken into a port, where he became a prisoner of war for two years.