The War of 1812 inspired American nationalism for many reasons, one of which being that it was the first war that the country fought as an independent nation against a foreign enemy. In this case, the enemy was Great Britain, its North American colonies in what is now Canada and many Native American nations.
Increased nationalism was a likely result of the war, as Americans in 1812 were not far removed from the Revolutionary War, which was also fought against Great Britain. As a recurring enemy, Americans were filled with national pride at the thought of a second war of independence. Americans cheered the victory of each battle as if they were cheering for the victory of the entire war, promoting a feeling of national unity and support for the military. But, it was the recovery from the largely unsuccessful war that inspired a string of nationalistic events.
After receiving smoke damage from the British invasion of Washington, D.C., the White House was washed and repainted a sparkling white. This signified a renewal of the nation, rising from the ashes of another devastating domestically fought war. Francis Scott Key was inspired by the battle at Fort Henry to write "The Star-Spangled Banner," which became the national anthem soon after the war. The aftermath of the battle led to many improvements in roads and city structure, as Americans overwhelmingly voted to increase spending for improvement projects.