Alongside fireworks and champagne, the Netherlands and Belgium rang in the New Year with some new territory after a revised border agreement between the European neighbors went into effect on Monday.

The unusual border situation centers on an area between the eastern Belgian municipality of Vise and the southwestern Dutch municipality of Eijsden that are split by the Meuse River.

Over time, the river's changing course meant that two uninhabited peninsulas that belong to Belgium ended up on the Dutch side of the river while a section of Dutch territory ended up on the Belgian side of the Meuse.

Read more: Netherlands to take Germany to court over road tax

Under the new deal, the border between the two countries in that area now splits down the middle of the river. The Netherlands gained an area the size of 23 soccer fields (16.37 hectares; 40.5 acres).

Belgium, on the other hand, gains an area as big as four soccer fields (3.09 hectares; 7.6 acres) and loses the idyllic nature parks on the peninsulas to the Dutch. The big win for Belgium, however, is a solution to a jurisdiction nightmare caused by the previous border.

A Google Maps screenshot shows the twisting and turning old border that created pockets of Belgian and Dutch territory on opposite sides of the Meuse River

A body and a border

The uninhabited peninsulas garnered a dark reputation over time. Residents complained that the small areas were used for illegal parties, drug deals, and prostitution, according to Dutch broadcaster NOS.

Around four years ago, things came to a head after a couple walking on one of the peninsulas stumbled across a headless body.

They informed the Dutch authorities, but police in the Netherlands were unable to investigate as the body was found on Belgian territory.

Read more: Belgian artist cut free after chaining himself to marble block to show 'burden of history'

On the other side, Belgian authorities had a difficult time getting to the crime scene. Belgian police are not allowed to cross into the Netherlands without receiving special permission, so they had to travel by boat.

The peninsula also didn't have a suitable docking area for their boats, Jean-Francois Duchesne, the police commissaire of the Lower Meuse region told the Associated Press 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. It really was not very practical," Duchesne said.

Read more: Waffle smoke wafts across Belgium's capital after factory fire

Belgian and Dutch royals signed off on the deal last November, over 170 years after the countries' borders were originally agreed in 1843.

In 2016, Belgium's Foreign Minister Didier Reynders hailed the deal, saying it was a sign of good relations between the two countries.

"The agreement shows that borders can also be exchanged peacefully," he said.