Boundaries of the United States and the several States:...(A Government Publication, 1976):
American State Papers:...(Great Britain---Northeastern boundary of Maine---):
Wikipedia has more:
...a confrontation in 1838–1839 between the United States and the British over the international boundary... . Top level diplomats from the US and Britain met in Washington and forged a peaceful compromise, the Webster-Ashburton Treaty in 1842, which fixed the permanent border.