The War of 1812 ended in a draw between the United States and Britain. But it could have ended badly for the United States, particularly in the second half of 1814. So after the war, President Madison vowed to strengthen the country’s military capabilities.
In both the American Revolutionary War and the War of 1812, the British launched invasions down Lake Champlain in the hope of cutting America in two. To ensure this could never happen again, the Madison Administration ordered the construction of a modern, heavy fort on the New York shore of Lake Champlain. It named the place Fort Montgomery in honor of General Richard Montgomery, a hero of the American Revolutionary War.
Engineers began construction of the fort in 1816. They placed Fort Montgomery on Island Point, a small promontory jutting out into the northernmost end of Lake Champlain. The fort, when finished, would be shaped like an octagon and have 30-foot tall stone walls deploying 125 cannons. No British warship could sail past it without coming under heavy fire.
There was just one little problem with the fort. Due to a surveying error, it was accidentally built half a mile north of the Canadian border.
Under the 1783 Treaty of Paris, the border between New York and Quebec was the 45th parallel. But the previous understanding of the location of that line of latitude was wrong.
Surveyors discovered this fact in 1818. By this point, the US had already spent $275,000 on construction, which was then quite a bit of money. The US government immediately ordered a halt to construction and abandoned the site. Fort Montgomery became known as "Fort Blunder."
It was only in 1842 that the US and Britain resolved the issue. The Webster-Ashburton Treaty provided that the original understanding of the border would prevail:
the old line of boundary surveyed and marked by Valentine and Collins previously to the year 1774, as the 45th degree of north latitude, and which has been known and understood to be the line of actual division between the States of New York and Vermont on one side, and the British Province of Canada on the other; and, from said point of intersection, west along the said dividing line as heretofore known and understood, to the Iroquois or se Lawrence river.
Construction resumed in 1844, after local residents had spent more than two decades looting the site for stone. It was used and manned until the 1920s, when the US government sold the site at auction. You can see more photos of it here.