British ships attacked Fort McHenry early on September 13, 1814, as the fort guarded the water approach to Baltimore and the future of the city, and possibly the United States, depended on the result. After the American defeat at Bladensburg and the British capture and partial burning of Washington, D.C., a loss here would have been devastating. Francis Scott Key witnessed the 25-hour bombardment, and at "dawn's early light" on September 14th the shelling ended and the British attack had failed. As the fleet withdrew down the Patapsco River, the defenders raised a huge 30x42-foot American flag, inspiring Key to write the words that became America's national anthem.