Why do we sing the national anthem before sporting events?

Meatloaf sings the National Anthem before the start of the 65th All Star Game at Three Rivers Stadium in Pittsburgh, Tuesday July 12, 1994. Players from left are San Francisco Giants Barry Bonds, San Diego Padres Tony Gwynn and St. Louis Cardinals Gregg Jefferies. (AP Photo/Susan Walsh) (Susan Walsh/AP)

On Sept. 13, 1814, with the United States at war with Great Britain, lawyer Francis Scott Key and an American prisoner exchange agent were sent to negotiate a prisoner release with the British Navy. While there, the two learned of an imminent attack on the city of Baltimore and were held captive while nearby Fort McHenry was bombarded.

Inspired by the eventual American victory -- and the sight of the flag still waving at sunrise -- Key wrote a poem entitled "The Defence of Fort M'Henry." After returning home, he showed the work to his brother, who decided to set it to an old British melody -- and "The Star-Spangled Banner" was born.

The song became increasingly popular over the 19th century, and began to pop up at parades and Fourth of July celebrations. In 1889, the Secretary of the Navy, Benjamin F. Tracy, stipulated that the song be played at any raising of the flag, and in 1916, President Woodrow Wilson signed an executive order formally declaring it America's national anthem. It wouldn't become a staple of the country's sporting events, though, until the 1918 World Series, thanks to an impromptu recital during the seventh-inning stretch.

With the nation embroiled in World War I, the 1918 World Series between the Cubs and Red Sox began under a dark cloud. It remains the only Fall Classic played entirely in September, after president Wilson's "Work or Fight" order (requiring all able-bodied men to either serve in the military or work in a "necessary" civilian occupation) brought a premature end to the regular season. Some even wondered why the Cubs and Red Sox were still playing at all, rather than enlisting, and players threatened to boycott in the face of lower-than-anticipated gate receipts.

And then, in the middle of the seventh inning of Game 1 at Comiskey Park (Chicago's home games were moved from Wrigley Field to Comiskey because it could seat more fans), a band managed to bring everyone together. From the Sept. 6, 1918, edition of The New York Times:

"As the crowd of 10,274 spectators stood up to take their afternoon yawn, that has been the privilege and custom of baseball fans for many generations, the band broke forth to the strains of 'The Star-Spangled Banner.'

The yawn was checked and heads were bared as the ball players turned quickly about and faced the music. Jackie Fred Thomas of the U.S. Navy was at attention, as he stood erect, with his eyes set on the flag fluttering at the top of the lofty pole in right field. First the song was taken up by a few, then others joined, and when the final notes came, a great volume of melody rolled across the field. It was at the very end that the onlookers exploded into thunderous applause and rent the air with a cheer that marked the highest point of the day's enthusiasm."

While fans got up and stretched, the Naval Training School Band -- which frequently attended Cubs games and even had a recruitment booth stationed at Wrigley Field -- struck up the national anthem, and immediately, both fans and players stood to attention.

Red Sox owner Harry Frazee, not about to let his franchise get one-upped, had something special planned as the series shifted to Boston: He hired a band to play "The Star-Spangled Banner" before all three games at Fenway Park, and the crowds kept loving it. From that day on, the anthem rang out on Opening Day, special occasions (like Independence Day) and the World Series -- and during World War II, when all Major League ballparks boasted public announcing systems, the tradition of the anthem before every game began.