The row has blocked Croatia's European Union membership talks. Reinfeldt, who is a strong supporter of EU enlargement, said the benefits of Wednesday's accord were "tremendous" for the two countries.
"This agreement opens new and forward-looking chapters in the bilateral relations between Slovenia and Croatia," he added.
The deal will allow international arbitration to resolve a thorny border dispute that arose after the two states declared independence from ex-Yugoslavia in 1991.
"I'm convinced that this is a good agreement for Croatia, Slovenia and the whole European Union. This is a great day for all of us. We want a solution that is a win-win-win situation for Croatia, Slovenia and the EU," Croatian Prime Minister Jadranka Kosor said after the signing ceremony in Stockholm hosted by Reinfeldt.
Sweden currently holds the EU presidency.
"In order to one day both be members of the EU, the two countries have to know where their border is to exercise sovereignty. In 18 years they have not been able to do this, but today they are on the path to success," Slovenian Prime Minister Borut Pahor said.
The agreement, which must be approved by the parliaments of the two countries, will create an arbitration tribunal tasked with finding a solution to the dispute.
"The trust between the two of us was of crucial significance," Pahor told Kosor. "We overcame the obstacles which were too high to reach for negotiations before us on the border issues."
The tribunal's ruling will be binding for both countries and will secure Slovenia's access to international shipping waters, a point crucial for Ljubljana.
On the other hand, under the deal Slovenia commits not to block Croatia's EU accession talks again and agrees that the arbitration will start only after Zagreb successfully concludes membership negotiations with the bloc.
Croatia resumed its EU membership talks in October after Slovenia, an EU member since 2004, ended a 10-month block of the negotiations because of the border dispute involving a small piece of land and sea.
Croatia is hoping to become the bloc's 28th member by 2011.