The federal government has the right to destroy data collected on long-gun owners in Quebec, the Supreme Court has ruled.

In a split 5-4 decision, the top court found the government's law requiring the destruction of gun certificate information is lawful under the Constitution, and the province of Quebec has no right to the data.

The decision marks a victory for the Conservative government on a key hot-button issue on which it has campaigned for years.

SCOC Religious Freedom 20150319

The Supreme Court ruled Friday on Quebec's right to preserve and use the federal long-gun registry data it helped collect. (Sean Kilpatrick/Canadian Press)

The judges went out of their way to say it was not ruling on the policy merits of a long-gun registry or its destruction, only on the legality of the government's latest law.

The majority wrote, "to some Parliament's choice to destroy this data will undermine public safety and waste enormous amounts of public money" but "to others it will seem to be the dismantling of an ill-advised regime and the overdue restoration of the privacy rights of law-abiding gun owners. But these competing views about the merits of Parliament's policy choice are not at issue here."

Quebec had argued the database was a joint effort by both federal and provincial authorities, and therefore Quebec had the right to the information in the spirit "cooperative federalism," a legal concept that ensures flexibility in the separation of powers.

Gun Laws 20140723

The Harper government passed legislation to end the federal long gun registry and destroyed most of its data in 2012. But the Quebec government argued it had a constitutional right to its records, so that province's data was protected until the issue was resolved in the courts. (Sean Kilpatrick/Canadian Press)

More to come