at capt. jan miles ' order , the crew hoisted a replica of the 15 - star , 15 -stripe u.s. flag that is believed to have flown over nearby fort mchenry during the war of 1812 ; the flag that tradition holds was still flying and inspired francis scott key to pen the national anthem .