Francis Scott Key wrote the words to The Star-Spangled Banner. He also wrote another song, called When the Warrior Returns, which also borrows the same tune and uses similar phrasing. It is almost a rough draft of The Star-Spangled Banner, although it was written many years earlier about a different event. He did not write the tune for either song. That honor probably belongs to a member of the Anacreontic Society, most likely John Stafford Smith. Here are all three songs, presented together so you can see how they developed.