The border between United States and Canada was fixed on June 15, 1846 by the Oregon Treaty as being "along the forty-ninth parallel of north latitude to the middle of the channel which separates the continent from Vancouver's Island, and thence southerly through the middle of the said channel, and of Fuca's Straits, to the Pacific Ocean."
However, there are actually two straits which could be called the middle of the channel: Haro Strait, along the west side of the San Juan Islands; and Rosario Strait, along the east side. Because of this ambiguity, both the United States and the United Kingdom claimed sovereignty over the San Juan Islands.
Exactly 13 years later, on June 15, 1859, this ambiguity lead to direct conflict: Lyman Cutlar, an American farmer, shot and killed a pig rooting in his garden. That pig was owned by the Hudson's Bay Company. When British authorities threatened to arrest Cutlar, American settlers called for military protection.
Initially, 66 American soldiers of the 9th Infantry under the command of Captain George Pickett were dispatched to San Juan Island. When British authorities learned of this, three British warships were sent under the command of Captain Geoffrey Hornby to counter the Americans. The situation continued to escalate; and by September, 461 American soldiers and 2140 British troops were stationed on San Juan Island. During this time, no shots were fired; both sides wisely chose not to involve "two great nations in a war over a squabble about a pig".
In September, U.S. President James Buchanan sent General Winfield Scott to negotiate with Governor James Douglas to resolve growing crisis. As a result, both sides agreed to retain joint military occupation of the island, reducing their presence to a token force. The "British Camp" was established on the north end of San Juan Island, and the "American Camp" was created on the south end.
This state of affairs continued for the next 12 years, when the matter was referred to Kaiser Wilhelm I of Germany. On October 21, 1872, a commission appointed by the Kaiser decided in favor of turning the San Juan Islands over to the United States.
See also: Aroostook War