(CNN) -- The prime ministers of Croatia and Slovenia signed a deal Wednesday to settle a long-running border dispute and remove a key obstacle to Croatia's prospects of securing European Union membership.
The agreement will see the neighbors' disagreement over the Gulf of Piran, a source of contention since the breakup of Yugoslavia in 1991, settled by arbitration in return for Slovenia lifting its veto on Croatia's accession to the EU.
Croatian Prime Minister Jadranka Kosor and Slovenian counterpart Borut Pahor signed the deal in Stockholm watched by Swedish Prime Minister Fredrik Reinfeldt, whose country currently holds the EU's six-month rotating presidency.
Kosor said that she and Pahor had established a "close and trusting relationship" during the negotiations and urged the parliaments of both countries to ratify the agreement.
"Today we have not just turned a page, we have opened a whole new book," said Kosor. "Now I hope that we will also receive the support of our respective parliaments and that today's agreement can give new hope to our neighbours in South Eastern Europe."
The Gulf of Piran is a 20 square-kilometer area of sea in the northern Adriatic. Slovenia, which has less than 50 kilometers of coastline, has long claimed sovereignty over the entire bay as its only corridor to international waters. Croatia claims the bay should be split down the middle.
Since Slovenia joined the EU in 2004 it has exercised its member's right of veto over Croatia joining the political and economic bloc. Other member states have also viewed the dispute as a bilateral conflict that should be resolved before Croatia can move ahead with the accession process.
"This is not only a historic day for Croatia, Slovenia and the EU, but for the entire international community," said Slovenian Prime Minister Pahor. "Today we have shown that we solve problems, we do not create them."
In a statement, EU enlargement commissioner Olli Rehn congratulated all parties on reaching an "historic agreement."
"This is a most European way of peaceful settlement of disputes," Rehn said. "I encourage both countries to proceed with ratification without unnecessary delay, and hope that Croatia makes the last mile in the negotiations, which are reaching the final stage."