The Dutch prisoners, all serving 10 years to life, have sued the government after plans surfaced of a multi-million euro deal with Oslo to transfer 242 Norwegian prisoners to the Netherlands.
"The long-term prisoners have to move out," The Hague's district court said in a statement after 18 inmates took the Justice Department to court to try to stop the deal.
The inmates at the Norgerhaven prison near Assen in the northern Netherlands said they will have to forfeit the privileges of long-term prisoners if they are transferred.
Relatives of the Norwegian inmates are also angry at the deal which will see the detainees transferred to another country hundreds of kilometres (miles) away.
Dutch deputy justice minister Fred Teeven on Monday signed a 25-million-euro deal with Oslo to hire out empty Dutch prisons to help alleviate waiting times in Norway to serve prison sentences.
The prisoners at Norgerhaven's "K section" however opposed the deal saying it would rob them of their current privileges. Inmates are allowed to grow vegetables, keep chickens, cook their own food, all this with a view on the scenic Dutch countryside, and have a generous daily exercise regime.
Dutch media have labelled them "luxury cells."
The prisoners also enjoy their own "hobby space", can choose what colour to paint a wall of their cells and have private 55-channel television, Dutch media reported.
"The... judge is of the opinion that the hiring out of the Norgerhaven prison to Norwegian authorities to house Norwegian prisoners is not unlawful," the court said.
The judge however ruled that the state "had to present the plaintiffs with an adequate alternative."
"The alternative (prison) must focus on the same special detention regime for long-term prisoners should they be transferred there," the judge ordered.
The Netherlands has predicted that around 700 of its prison cells will become vacant over the next five years and has housed 550 Belgian convicts in southern city Tilburg since February 2010.
The Netherlands-Norway deal still needs to be approved by both countries' parliaments and hopes to see the first Norwegian convicts move in on September