The answer, according to James Moore, who as minister of Canadian heritage is in charge of the campaign, is that the government simply wants the long-ago war, which few Canadians know well, to be remembered.

“Canada was invaded, the invasion was repelled and we endured, but we endured in partnership with the United States,” Mr. Moore said. “It’s a very compelling story.”

Image Dunvegan hosts an annual War of 1812 re-enactment. Credit... The New York Times

But because Canada did not become a nation until 1867, the War of 1812 was actually a battle between the young United States and Britain. Why the comparatively powerless United States took on the imperial power still remains a matter of considerable discussion. But the conflict did follow British interference with American trade and American concerns about Britain’s intentions in North America.

At the time, many residents of the colonies that later became Canada were Americans who had immigrated for free land rather than to support Britain. Many historians, including Mr. Bercuson, agree that British regular troops deserve most of the credit for repelling the American invaders.

Even the eventual victor remains a subject of some dispute. In his book “The Civil War of 1812,” Alan Taylor, a professor of American and Canadian history at the University of California, concludes that it was “a military stalemate” that created sharper distinctions between the United States and the neighbor to its north.

On a recent Saturday afternoon at the Glengarry Pioneer Museum in Dunvegan, there was little indication that the government’s commercials had provoked War of 1812 mania. Perhaps it was bad weather in nearby Ottawa, but the organizers of an annual War of 1812 battle re-enactment said attendance was less than last year.