John J . Almy John Jay Almy ( April 21 , 1815 – May 16 , 1895 ) was a U . S . Navy Rear - Admiral , who held the record for the longest period of seagoing service ( 27 years , 10 months ) . In the Mexican War , he took part in the capture of Vera Cruz , and in the Civil War , he captured four blockade - runners and destroyed four others . As a Rear - Admiral during a violent revolt in Panama in 1873 , he was able to protect American and European property , earning official thanks from many nations . Biography . Almy was born in Newport , Rhode Island the son of Samuel Almy , who had been brought up as a Quaker , but was " read out " of the Society for marrying out of the fold . Almy was named John Jay , after the first chief justice of the United States . He was appointed midshipman on February 2 , 1829 , and served aboard the and the in the Mediterranean and on the coast of Brazil , before being examined and promoted to passed midshipman on July 3 , 1835 . After a year aboard the receiving - ship at New York , he returned to the Mediterranean aboard serving as acting - master and navigator . Almy received his commission as lieutenant on March 8 , 1841 . He then served aboard the brig in the West Indies , and on the frigate on the coast of Africa . In 1847 , while serving on the ship in the Gulf of Mexico and on the Pacific coast during the Mexican War , he took part in the siege and capture of Vera Cruz and in the capture of Tuxpan , and in 1848 , while the navy was in occupation of Mazatlán , he commanded one of the forts . Almy then served in the Coast Survey from 1851 to 1856 , assisting in the making of detailed charts of Chesapeake Bay and the sea - coast of Virginia and North Carolina . In 1857 he was given command of the on the coast of Central America , and was present at the surrender of William Walker and his filibustering party to Rear - Admiral Hiram Paulding at Nicaragua . In his reports to the Navy Department Rear - Admiral Paulding noted that , " Lieutenant - Commander Almy performed his part of the work exceedingly well , and is an officer who can be relied upon at all times . " Almy also commanded the " Fulton " in the Paraguay expedition of 1858 – 59 . Almy then served at the New York Navy Yard before being commissioned as commander on April 24 , 1861 . During the Civil War he commanded firstly the in the South Atlantic Blockading Squadron under Admiral Du Pont from 1862 to 1863 , then the in the North Atlantic Blockading Squadron under Admiral Lee in 1864 , and finally the in the South Atlantic Blockading Squadron under Admiral Dahlgren in 1865 . While in command of the " Connecticut " , Almy captured four noted blockade - runners with valuable cargoes , and destroyed four others . Almy was promoted to captain on March 3 , 1865 , and commanded the " Juniata " in a cruise to the South Atlantic , operating off the coasts of Brazil and Africa in 1865 – 67 . While on the Brazilian coast , he rescued the crew of the shipwrecked Brazilian brig " Americo " , receiving the thanks of the Emperor of Brazil . After serving as an ordnance officer at the New York Navy Yard , he was commissioned as a commodore on December 30 , 1869 , and served as Chief Signal - Officer of the Navy at Washington from 1870 – 72 . He was promoted to Rear - Admiral on August 24 , 1873 , and the following month took command of the Pacific Squadron . While at Panama in October 1873 , a violent revolt broke out , which lasted for three weeks . Almy landed a force of 200 seamen and marines to protect American and European property and interests , and received the thanks of the Panama Railroad Company , the Pacific Mail Steamship Company , and all of the consuls and the foreign merchants at Panama in return . In 1875 Almy was presented with the Order of King Kamehameha I by King Kalākaua of Hawaii , after organising the King ' s trip to the United States on U . S . Naval vessels . In July 1876 , after serving for two years and ten months in the Pacific , Almy returned to the United States , and having reached the mandatory age , was retired in April 1877 , having served for a total of twenty - seven years and ten months at sea , the longest of any officer of the navy up to that time , as well as fourteen years and eight months on shore . Almy was the first naval officer to serve as the Commander - in - Chief of the Military Order of the Loyal Legion of the United States , succeeding President Rutherford B . Hayes in January 1893 , and serving until his death . Admiral Almy died his home on Vermont Avenue in Washington , D . C . in May 1895 . After a service at the Church of the Ephiphany he was interred at the Congressional Cemetery , rather than Arlington , at his own request . Personal life . Almy was twice married . By his first marriage he had five children . His second wife was Alida Armstrong Gardner .