OTTAWA -- The Federal Court of Appeal says the government does not have to release parts of a government memo about the Senate's expense scandals in 2013 because it constituted legal advice for then prime minister Stephen Harper.

In a ruling dated April 24, a three-judge panel says the document from the clerk of the Privy Council is subject to solicitor-client privilege even though the clerk at the time wasn't a lawyer, because Privy Council lawyers helped write it.

The court ruling says some emails, letters and details in the July 2013 package must be released, including the decision Harper made based on the advice he got.

That's less information than a lower-court judge said had to come out.

The decision is the latest twist in a nearly four-year legal battle between the Prime Minister's Office and the federal information commissioner stemming from an access-to-information request from The Canadian Press.

The information commissioner's office says it is still deciding whether to appeal.