The Quebec court said the Harper government has no right to destroy the registry data in that province against the will of its provincial government, and Monday's 42-page verdict cited the prime minister's own words as evidence of improper behaviour.
In a victory for the Quebec government, which is trying to keep its portion of the registry alive, the verdict gave the federal government 30 days to hand over the registry data for that province. The decision only applies to Quebec data.
However, it's likely just one more round in a broader legal battle. The issue is expected to wind up before the Supreme Court of Canada. Within moments of Monday's verdict, the federal government all but announced plans to appeal.
The ruling came after the province obtained a series of temporary injunctions safeguarding the Quebec data, which has resulted in long guns continuing to be registered here unlike everywhere else in the country.
Justice Marc-Andre Blanchard of the Quebec Superior Court ruled Monday that the federal government didn't create the registry alone, and can't destroy the registry alone.
He wrote that the registry was created in the 1990s by a partnership that included multiple agreements over how the information would be gathered and accumulated.
"There is a complex web between the federal, provincial and municipal authorities that wove the firearms registry which means that it could not have existed without the close and constant co-operation of everyone," Blanchard wrote in his conclusion.
"The implementation of the firearms registry — although under the federal power to legislate criminal law — creates a partnership with Quebec, particularly with regard to the data contained in the registry."
The bill to end the federal registry received royal assent on April 5, fulfilling a long-standing promise by the Harper government to decriminalize non-registration of long guns.
In Quebec, where there is a strong current of support for gun control, the provincial government has fought back. The outgoing Charest Liberal government began a battle that the next Parti Quebecois government will certainly continue, and perhaps even amplify.
Quebec argued that it has a right to the information because its taxpayers helped build and pay for the registry. It is the centrepiece to a new provincial registry that has not yet been designed.
The Harper government is steadfastly opposed to relinquishing any data, which it is determined to destroy. It says Quebec can start from scratch if it wants to build its own registry.
Monday's verdict quotes Harper saying that he won't help another level of government keep the registry alive.
After citing that example, the judge declares that Canadian constitutional law implores politicians to practice flexible and co-operative federalism and not "undermine" that spirit.
"This lack of respect for the jurisdiction of Quebec obviates the principle of cooperative federalism that aims to satisfy the needs of both the country and its components," Blanchard wrote.
Opponents of the registry called it wasteful and irrelevant in stopping crime. Its supporters, however, including some police organizations, described the registry as a valuable tool in law-enforcement's arsenal.
Blanchard said the Quebec government made some pro-registry arguments that went undisputed.
Ninety per cent of registered weapons in Quebec are long guns and, since the registry was put in place, there has been drop in gun-related crimes as well as homicides and suicides committed with a weapon, he said, citing testimony from the case.
Gun-control advocates applauded the ruling.
"The decision of the court reaffirms the fact that the data on guns is useful, that the province which contributed to collecting it is entitled to keep it and that it is in the interest of public safety to maintain it," the Coalition For Gun Control said in a statement.
The organization was founded in the wake of the Montreal massacre in 1989, which helped prompt a renewed federal push for gun control that led to the creation of the registry.
Gun-control advocate Heidi Rathjen, who was at Montreal's Ecole polytechnique in 1989, said the ruling meant Quebec was one step closer to having a registry of its own.
"(I'm) very relieved, very happy, it's a good day for gun control," said Rathjen, who heads Polysesouvient, a group remembering the victims of the massacre.
"The judge underlined that the federal government has been acting in bad faith and the only reason they (want) to destroy the data is to prevent Quebec from doing what it wants to do."
The federal government reacted swiftly and critically to Monday's verdict.
"I am disappointed with today's ruling and will thoroughly review the decision," Public Safety Minister Vic Toews said in a statement.
"The will of Parliament and Canadians has been clear. We do not want any form of a wasteful and ineffective long-gun registry...
"Our Conservative government will continue to fight against any measures that needlessly target law-abiding hunters, farmers and sport shooters."
Quebec's outgoing Liberal government said it was pleased with its latest court victory.
Justice Minister Jean-Marc Fournier said the legal challenge has widespread support from a majority of Quebecers as well as all parties in the provincial legislature, the province's police forces and families who have been victimized by gun violence.
The premier-designate, Pauline Marois of the Parti Quebecois, was at the funeral for a long-gun victim Monday. She avoided commenting on the political issue while speaking to reporters outside the funeral for Denis Blanchette, who was shot and killed outside the PQ's victory party last week.
Also on HuffPost