Justice Marc-Andre Blanchard's ruling on Friday extends the injunction until June 13, which is the third and last day of scheduled court hearings on the fate of the gun-registry information.
The decision means the registry remains operational in Quebec while safeguarding the information gathered over the years.
The province is attempting to use the data for its own gun registry, but Ottawa is opposed to relinquishing it.
Federal lawyers have opposed Quebec's injunction attempts, arguing the province should gather its own data if it wants to start its own registry.
Quebec has countered it would be too expensive to replace data from the federal registry and that it gathered the information in the first place.
The judge hearing the case has said he believes the case will eventually end up on the doorstep of the Supreme Court of Canada.
"It's an exceptional debate and is, according to the parties, a first in Canadian judicial annals," Blanchard wrote in his judgment.
"Two governments, democratically elected, propose diametrically opposed views of what constitutes the public good."
Bill C-19, the bill to end the federal long-gun registry, received royal assent on April 5, fulfilling a long-standing promise by the Harper government to eliminate the data.
On that same day, Quebec received an emergency injunction that was extended a week later. The province is the only jurisdiction that has sought information from the registry.
Lawyers are preparing to argue the actual merits of the case over three days, beginning June 11.
Quebec Justice Minister Jean-Marc Fournier told a news conference Friday he was pleased with the favourable ruling.
"This is certainly a victory for Quebec and open federalism, of respect, equality and co-operation to which we adhere," Fournier said.
He used a hockey analogy to describe the approach to the June hearings.
"The last period of a game is always decisive, but it's always preferable to start the third period with a lead," Fournier said.
A spokeswoman for federal Public Safety Minister Vic Toews said the ruling doesn't diminish the government's commitment to ending the long-gun registry for good.
"We are disappointed to see that, contrary to the will of Canadians and of Parliament, the wasteful and ineffective long-gun registry is still alive," Julie Carmichael said in an email.
"Bill C-19 is clear and our government will strongly oppose efforts to set it aside and will fight for as long as it takes to ensure the long gun registry is scrapped once and for all."
Also on HuffPost