To fight the War of 1812, the republic formed a small regular military and trained it to protect the frontiers and coastlines. Although it performed poorly in the offensive against Canada, the small force of regulars backed by a well-armed militia, accomplished its defensive mission well. Generals like Andrew Jackson proved that, just as they had in the Revolution, regulars and militia could be effective when employed as a team.