Ottawa is appealing an Ontario court ruling that, if left to stand, could make the possession of marijuana legal in the province.

The Public Prosecution Office of Canada announced Tuesday that it has filed a notice of appeal with Ontario's top court in respect to Justice Donald Taliano's April 11 ruling.

The appeal states that Taliano made critical errors in law by declaring the federal medical marijuana program unconstitutional.

Taliano ordered that Ottawa fix the program by July or face the prospect of effectively legalizing marijuana.

The judge's decision came in a criminal case involving Matthew Mernagh, 37, of St. Catharines, who was unable to obtain a medical marijuana licence.

Mernagh's lawyer, Paul Lewin, has said that he's confident the decision will be upheld by the Ontario Court of Appeal.