The War of 1812

The War of 1812 has been referred to as the second American war of independence from Great Britain. While the United States failed in its main goals for this war, the War of 1812 did legitimate the nationhood of the growing United States, and it gained the country new respect from other nations. The status of America as independent from Great Britain was confirmed by this war, and after the war American nationalism blossomed.
America tried to preserve their neutrality and their rights by stopping all foreign trade, which had different effects. This led to a massive drop in American exports and hurt the national economy significantly. Americans felt that they had stood by and watched Great Britain abuse their rights for years. Americans declaring war was another chance for them to establish their independence. Neither side achieved a conclusive victory in the war. The United States did though win significant victories at battles such as Lake Eire, Fort Henry, and the Battle of New Orleans.
Both sides signed the Treaty of Ghent in 1814, which did not end the war but it did resolve the prior situations that had helped to cause the war. The war underlined the nation's need to strengthen the federal government and improve their defense. The war also inducted the Star Spangled Banner as the national anthem. As a return to peace and the increase in American confidence followed by the War of 1812, this post-war optimism is referred to as the Era of Good Feelings. American unity and nationalism began to make itself known in diverse and unexpected areas such as the national culture, the economy, and foreign policy. Freedom of governance was encouraged as political conflict decline.  

References:
Davidson, Gienapp, Heyrman, Lytle, & Stoff, (2005). Nation of Nations: A Concise Narrative of
the American Republic. Retrieved from University of Phoenix eBook Collection database.