The quickly constructed, earthen star-shaped Fort Whetstone, built in 1776, was the first fortification to occupy the site where Fort McHenry now stands.
The city's vulnerability to a waterborne attack was exposed in the spring of 1776 when the British sloop Otter sailed unchallenged up the Chesapeake Bay.
Baltimoreans quickly sprang into action, and the Maryland Council of Safety began to supervise construction of the fort on Whetstone Point, which was to include an 18-gun battery.
In order to keep out and frustrate any enemy ship trying to enter the harbor, three iron chains suspended by floating blocks of wood were stretched from the fort across the Patapsco River to Lazaretto Point.
A small passage was left open for friendly shipping to pass through (though to ensure their friendliness, they were required to sail directly under the battery's guns).
The feared British attack during the Revolutionary War never came, and by 1780, with the fort in decline, everything except the cannons and furniture was ordered sold.
When England declared war on France in 1793, the fort, which had remained under Maryland control, was turned over to the federal government.
The next year, Congress authorized and embarked on a massive program of constructing coastal forts along the Atlantic Coast to protect shipping and cities.
Maj. John Jacob Ulrich Rivardi had been appointed by Secretary of War Henry Knox to oversee construction of the present Fort McHenry, which began in 1794.
The fort was named for Marylander James McHenry, a signer of the Constitution and member of the Continental Congress who served as the nation's third secretary of war from 1796 to 1800.
The design of the pentagonal structure, which was completed by 1803, was the concept of French engineer Jean Foncin.
Secretary of War William Eustis wrote in 1811 that the fort was "a regular pentagon of masonry, calculated for thirty guns, a water battery, with ten heavy guns mounted, a brick magazine that will contain three hundred barrels of powder, with brick barracks for two companies of men and officers; without the fort, a wooden barracks for one company, also a brick store and gun house."
The fort's only trial by fire wasn't long in coming.
In 1812, the United States declared war on England, and two years later, after marching on and burning Washington, British forces turned their attention to Baltimore, where they attempted an invasion by land and sea.
A British flotilla of 50 warships rode at anchor off North Point, 12 miles from the city, on Sept. 11, 1814. As tensions mounted, Gen. Sam Smith, who was in charge of the defense of the city, made sure his force of 15,000 men was ready for the inevitable attack.
It was raining early Sept. 13 when a furious bombardment commenced. It was over by dawn the next day. The fort had held by virtue of its plucky band of defenders, and the British fleet was in retreat.
Its bravery and steadfastness inspired Francis Scott Key, who once described the War of 1812 as a "lump of wickedness," to pen what became "The Star-Spangled Banner."
The city had been spared, and it was the first and last time the fort's batteries would fire on an enemy.
The fort was abandoned by the federal government in 1860, and revived again with the outbreak of the Civil War.
During the Civil War, members of the state legislature and other Marylanders sympathetic to the Confederacy were imprisoned at the fort. After the Battle of Gettysburg, more than 7,000 Confederate prisoners were incarcerated there.
As Fort McHenry's strategic usefulness began to fade, the decision was made to close it in 1912, with its land being redeveloped into a cattle quarantine station.
An editorial in The Baltimore Sun decried this plan as a "desecration," and suggested that "prominent Maryland men and women bring this to the attention of Congress."
A July 4, 1911, Sun editorial said, "Fort McHenry should be converted into a national park by act of Congress, reserved forever as a possession of the nation."
On July 20, 1912, the 141st Coastal Artillery Co., the last unit at the fort, departed for Fort Strong in Boston harbor, bringing down the curtain on 110 years of military usefulness.
"The flag, which the British could not shoot away, was hauled down by a lone soldier. No bugle sounded retreat; no soldiers stood with bared heads. Fort McHenry was dead," reported The Sun.
It didn't take long for the neglected fort to become overrun with weeds.
A headline in The Sun lamented, "Poor Old Fort McHenry — Can't Somebody Do Something?"
On May 20, 1914, The Sun reported that by a unanimous vote, the city's Board of Estimates agreed to accept the federal government's offer of Fort McHenry for use as a public park.
Several months later, The Sun reported, Baltimoreans climbed aboard the No. 2 streetcar that took riders to the fort's gate where they roamed the grounds. The Sun said it had become a "popular destination for families who spend the day on the reservation."
It was another war that once again brought Fort McHenry back to military usefulness. In 1917, the Army established General Hospital No. 2, a 3,000-bed facility that was used to care for wounded soldiers from Europe.
The fort was closed in 1920, and two years later, the temporary hospital building that had been erected by the Army during the war was torn down.
Fort McHenry was declared a national park in 1925 and placed under the administration of the War Department.
During the 1930s, the Works Progress Administration began to restore Fort McHenry to its present 19th-century appearance. It came under the authority of the National Park Service in 1933.
History of sorts was made again June 14, 1922, when President Warren G. Harding arrived at the fort to dedicate a memorial to Francis Scott Key. It was the first time an American president's voice had been broadcast on the radio.