During the War of 1812, Francis Scott Key, an American lawyer, took a drinking song that had been written in Britain in the late 1700s and put verses to it, inspired by the patriotic courage he witnessed in the battle against the British forces near Washington, DC. The British had captured Key aboard their ship to keep him from revealing the plans of the attack until after the battle ended. The bombardment started on Tuesday, September 13, 1814, and continued all day and almost all night. He paced the deck all night. When dawn came he saw through the mist that the American flag was still flying over the walls of the fort. Key was deeply moved. He pulled a letter from his pocket and scribbled these famous verses quickly on the envelope. By November 1814, the song had been published in Baltimore under the name "The Star-Spangled Banner." It was soon published in several other American cities and quickly gained popularity. The U.S. Congress officially approved the song as the national anthem in 1931.