Many Marines might argue that this “hymn” could be set in any of America’s conflicts in which the Marines participated. Yet it was written at a specific time, when the Marines were struggling to defend their place in America’s defense establishment. Therefore, the most appropriate setting is the middle of the 19th century, when the Marines built their case that they were a necessary part of America’s military arsenal.
The Marines trace their origins to 1775, when the Second Continental Congress created the Continental Marines along with the Continental Army and Continental Navy. The first shots of the American Revolution had just been fired at Lexington and Concord, and the Congress concluded that one piece of America’s military response should be an amphibious attack on Nova Scotia; for this they needed Marines.
At the end of the Revolution, all three military branches were disbanded. In part, this was tied to the argument that the new government formed under the Articles of Confederation was the sole body authorized to create an enduring army; the Continental Army raised by the Continental Congress should therefore be dissolved. But Americans were also moved to dissolve the Armed Forces by their suspicion of standing armies. They believed that armies maintained during peacetime were dangerous, so they demanded the quick demobilization of the recently formed branches as soon as the war ended.
The new Congress quickly authorized the raising of a small Army, but the Marines, with their more narrow purpose, were not reformed until 1798 when growing tensions between the US and France led some to believe that war was imminent and amphibious assaults would be necessary. This war never materialized (well, there were a couple shots fired, but it’s called the “Quasi-War” for a reason), but the Marines did play minor roles in the War of 1812 and the Seminole Wars and a huge role in the First Barbary War.
By 1850, the Marines had played important parts in several military conflicts, but their importance was still being challenged. Over the years, the need for a separate branch of amphibious assault troops was constantly being questioned. Army officials argued that the role could be as easily filled by their own troops, and it was in that context that “The Marines’ Hymn” was written. It makes sense that they would embrace a song that promised to "fight our country’s battles on the land as on the sea" and that they would couple this promise to a reminder of the fact that they had already advanced America’s military ambitions “from the Halls of Montezuma to the shores of Tripoli.” We just love singing that line.