Throughout history, disputes over international borders have led to long, bloody wars. Even today, there are dozens of border disputes around the world that threaten to spark conflict. But an unusual agreement reached in Europe this week proves that not all potential border changes are quite so contentious.

During the state visit of King Philippe of Belgium to the Netherlands on Monday, the two countries signed a treaty to swap land on their borders, potentially bringing to an end a decades-long situation that had led to pockets of lawlessness in areas of both countries.

Under the agreement, which is expected to go into force Jan. 1, 2018, if ratified by the parliament in each country next year, Belgium will give 40.45 acres of land to the Netherlands — namely, two uninhabited areas known as Presqu’île de L’llal and Presqu’île d’Eijsden.

In return, Netherlands will give the area of Presqu’île Petit-Gravier, roughly 7.63 acres large, to Belgium.

According to Dutch newspaper AD, at the treaty-signing, Belgian Foreign Minister Didier Reynders told reporters that it was remarkable that a border change had taken place without conflict. “Perhaps that is only possible between the Netherlands and Belgium,” he said.

The land swap is a result of an odd geographic situation. For more than a century, the Meuse River had served as the border between the Belgian municipality of Vise and its neighboring Dutch municipalities of Maastricht and Eijsden-Margraten. However, after dredging works between 1960 and 1980, the course of the river was straightened to make the connection between the Juliana Canal and the Albert Canal easier.

The unintended result? Small plots of Belgian land on the “Dutch side” of the river and vice-versa.

The changing river route meant that the 1843 Treaty of Maastricht that created the borders between Belgium and the Netherlands was no longer accurate. Perhaps more importantly, it created an obvious practical problem: The river made it difficult for law enforcement in either country to get across to police these de-facto peninsulas.

In turn, authorities say that they became a haven for crime and antisocial behavior. In particular, drug dealing and illicit sex became a problem in areas that had previously been better known for their wildlife. Just a few years ago, a passer-by in one area found a headless body. “They alerted Dutch authorities, who told them it was Belgian territory,” Jean-Francois Duchesne, police commissaire of Belgium's Lower Meuse region, told the Associated Press late last year

“So we had to go there by boat with all that was needed — the prosecutor, the legal doctor, the judicial lab — we had to do round trips over the water,” Duchesne said. “It really was not very practical.”

Talks have been in the works to move the border since at least 2012, but the process has proved remarkably complicated. Earlier this year, the Dutch province of Limburg released a video to help explain both the unusual border situation itself and the convoluted efforts to reach a more sensible border.

It now looks all but certain that the border will be changed at the start of 2018, finally ending the small patches of lawlessness in both countries.

Not all suggested border changes can go so smoothly, of course. A recent plan to move Norway's border with Finland — the idea being that Norwegians could give a gift of a mountain to their Finnish neighbors — was halted in October due to legal complexities.

But some more complicated border disputes have recently been resolved diplomatically, too. Last year, India and Bangladesh began the exchange of more than 160 enclaves — small areas of sovereignty completely surrounded on all sides by another country — and ending what may have been the world's weirdest border dispute after 70 years.

That situation was especially notable because the area contained the only third-order enclave in the world: That's an enclave surrounded by an enclave surrounded by an enclave surrounded by another state, for the uninitiated. That may come as good news to both Belgium and the Netherlands. There are a web of enclaves within enclaves in Baarle-Hertog, a Belgian municipality with pockets of Dutch sovereignty, the unexpected result of medieval treaties and land swaps.

More on WorldViews