How was “The Star-Spangled Banner” written?

It was written on a ship during the War of 1812.

It was a British poem that was rewritten to fit the United States.

It was part of a poem contest for America’s centennial celebration.

It was written by a Union soldier during the Civil War.