Boundary battles between states are not common, but they can be intense. California has argued with Nevada and Oregon, even taking one case as far as the United States Supreme Court. Georgia has tried to get Tennessee to create a joint boundary commission, but Tennessee has refused. In 1835, Ohio and Michigan even went to war over the issue, amassing militias. No one was hurt, and the two sides compromised.

The Carolinas embarked on the effort to determine exactly where one began and the other ended in the mid-1990s, when Duke Energy, the North Carolina power company, sold some land along the border to the state. South Carolina did not want to buy land in North Carolina, but figuring out exactly where North Carolina was proved difficult.

“We’d been having nagging problems along the state line for years,” said Sid Miller, who heads the South Carolina side of a joint boundary commission. “This was a way to re-establish the boundary once and for all.”

The problems began, as they sometimes do, with the king of England, who ordered a survey of the two colonies in the 1700s. It was hard, long and imprecise work. Equipment was rudimentary. Surveyors marked the boundary as best they could by hatching notches into trees, sometimes giving up when the swamps and the panthers became too much.

Although other surveyors came behind them in ensuing years, the official boundary set in 1772 is what Mr. Miller and his counterpart in North Carolina, Gary Thompson, have been working together since the 1990s to re-establish.

They are part detectives, part geography geeks and part historians. And they are almost done. Out of the 335-mile-long border, they have gotten all of it but about 40 miles re-established. By the end of the year their work will be complete and their findings will be turned over to the legislatures in both states for ratification.