OTTAWA -- The Supreme Court of Canada has ruled against the Ontario government in a case involving access to some information from the province's sex offender registry.

A freedom-of-information request asked the ministry of Community Safety and Correctional Services to disclose the number of offenders living in each area designated by the first three digits of Ontario postal codes.

The ministry refused, citing privacy exemptions.

The province's information commissioner ruled the exemptions did not apply and ordered disclosure.

The ministry unsuccessfully appealed that decision before turning to the Supreme Court.

In its 7-0 decision, the high court sided with the commissioner.

"We are of the view that the commissioner made no reviewable error in ordering disclosure," Justices Thomas Cromwell and Richard Wagner wrote on behalf of the court.

They said the commissioner carefully considered the relationship between the sex registry law and the freedom of information statute.

"She reasonably concluded that disclosure could not lead to the identification of offenders or of their home addresses and that the ministry did not provide sufficient evidence of the risk of the harms which the relied-on exemptions seek to prevent," the ruling said.

"We would dismiss the appeal."