TORONTO -- A plot to delete documents about the Ontario government's pre-election cancellation of two gas plants struck at the heart of the democratic process, a judge said Wednesday as he sentenced a former top political aide to four months in jail.

The crime committed by David Livingston, chief of staff to former Liberal premier Dalton McGuinty, was extremely serious and demands proper denunciation, Ontario court Judge Timothy Lipson said.

"His conduct was an affront to, and an attack upon, democratic institutions and values," Lipson said. "An attempt to tamper with the democratic process requires a strong denunciatory response."

Lipson also sentenced Livingston, 65, a first-time offender with an otherwise exemplary record of private and public service, to 12 months probation, including 100 hours of community service. Livingston was led from court in handcuffs.

Defence lawyer Brian Gover said outside court that his client would appeal both conviction and sentence, and denounced the punishment meted out to Livingston, a married father and grandfather.

"That is a harsh and excessive sentence in the circumstances of this case where there was no proof of actual harm," Gover said. "You can imagine how upsetting this is for all of them."

Livingston was released on bail late Wednesday pending his appeal.

In passing sentence, Lipson said Livingston had directed the indiscriminate wiping of hard drives in the premier's office in a deliberate effort at sparing the government embarrassment over its costly decision to scrap two gas plants ahead of the 2011 provincial election.

The document destruction occurred against express warnings from alarmed senior bureaucrats and amid deception by Livingston as to his real intentions, Lipson noted.

The sentencing in the politically sensitive case comes just two months ahead of a general election in which Ontario voters will cast judgment on McGuinty's successor, Premier Kathleen Wynne, who has not been directly implicated in the gas plants scandal although she was a cabinet minister at the time.

With unofficial campaigning for the June 7 election well underway, the leader of the opposition Progressive Conservatives said the Liberals have shown a pattern of "corruption" since their first election in 2003.

"This guy is going to spend four months in jail but we're still out $1.1 billion," Doug Ford said in a note to supporters. "Fifteen years of Liberal corruption and scandals has to end."

NDP Leader Andrea Horwath had similar comments.

Attorney General Yasir Naqvi said the government believes in transparency and has brought in new measures on document retention.

Livingston was found guilty in January on two counts: illegal use of a computer and attempted mischief to data. The latter charge was stayed. The prosecution earlier withdrew a charge of breach of trust. Livingston's co-accused, former deputy chief of staff Laura Miller, was acquitted on all counts.

The judge said Livingston had an "exceptional" employment history, noting he had been a long-time senior executive with a big bank and then Infrastructure Ontario before taking the nine-month secondment to the premier's office in 2012.

"The court received a very positive pre-sentence report," Lipson said, pointing to the more than two dozen character reference letters, many read in court, submitted in Livingston's favour. "I would characterize Mr. Livingston's overall community service in a variety of spheres as exceptional."

At the end, however, Lipson said he accepted the prosecution's characterization of the accused as a "sophisticated government actor" who was in a position of trust and fully aware of his actions.

The upshot, the judge said, was that a conditional discharge or house arrest as the defence had requested was inappropriate and "utterly contrary" to the public interest. Livingston attempted to interfere with the parliamentary democratic process and the public's right to access information about political decisions, the judge said.

"Accountability is vital to the functioning of the democratic process," Lipson said. "It is a troubling fact in this case that Mr. Livingston's express lack of respect for his legal obligations animated his criminal conduct."

Livingston had been defiant when warned about the perils of destroying documents, calling it "political bullshit," the judge said. The accused, who wielded "significant power and influence," also was deceitful in gaining access to the computers.

"The offence is very serious because it involves an attempt by the defendant to thwart the core values of accountability and transparency that are essential to the proper functioning of a parliamentary democracy," Lipson said. "The defendant's conduct was egregious and his degree of responsibility high."