Francis Scott Key was not a prisoner of the British when he wrote the Star Spangled Banner. He was the head of a peace mission sent to negotiate the release of Dr. William Beanes, a physician. However, Keys caught wind of their sneak attack on Fort McHenry so the Brits detained them until after the fighting — and their defeat.