The "Marines' Hymn" is the official hymn of the United States Marine Corps. It is the oldest official song in the United States military....
....Some of the lyrics were popular phrases before the song was written. The line "To the shores of Tripoli" refers to the First Barbary War, and specifically the Battle of Derne in 1805. After Lieutenant Presley O'Bannon and his Marines hoisted the American flag over the Old World for the first time, the phrase was added to the battle colors of the Corps. "The Halls of Montezuma" refers to the Battle of Chapultepec, during the Mexican-American War, where a force of Marines stormed Chapultepec Castle. While the lyrics are said to date from the 19th century, no pre-20th century text is known. The author of the lyrics is likewise unknown. Legend has it that it was penned by a Marine on duty in Mexico.....
....
On 21 November 1942, Commandant Thomas Holcomb approved a change in the words of the first verse's fourth line from "On the land as on the sea" to "In the air, on land, and sea" to reflect the addition of aviation to the Corp's arsenal.
http://en.wikipedia.org/wiki/Marines'_Hymn