A top aide to former Ontario premier Dalton McGuinty was sentenced on Wednesday to four months in jail for his role in wiping government computers after the Liberals cancelled two gas-fired power plants in 2011.

David Livingston, McGuinty's chief of staff from 2012 to 2013, was also sentenced to 12 months probation and ordered to complete 100 hours of community service.

Livingston was found guilty of one count of unauthorized use of a computer and one count of attempting to commit mischief to data in January. The latter charge, however, was stayed in February.

Livingston's deputy at the time, Laura Miller, was found not guilty of the same charges.

The Crown argued for a six-month jail term for Livingston, while his defence had called for a conditional discharge. That would have meant Livingston would have no criminal record if he fulfilled the imposed conditions.

Livingston, 65, was part of a plot to delete potentially embarrassing records related to the government's decision to cancel the gas plants ahead of the 2011 Ontario election.

Justice Timothy Lipson said at the sentencing that he agrees with the Crown's contention that Livingston attempted to interfere in the democratic process and that "incarceration is necessary" given the nature his offence.

"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."

Livingston's 'conduct was egregious,' judge says

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

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 a parliamentary democracy," Lipson said.

"The defendant's conduct was egregious and his degree of responsibility high."

Defence to appeal sentence

Defence lawyer Brian Gover said outside court that his client would appeal both conviction and sentence. Gover, who said he expected Livingston to be granted bail pending an appeal without having to spend the night in jail, denounced the punishment meted out to his client.

"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."

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.

Livingston, who 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, had an "exceptional" employment history, the judge said.

"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."

Political rivals respond

Ontario Progressive Conservative Leader Doug Ford sent out an email following the sentencing. He said the saga is evidence that the Liberals have "no respect for the taxpayer dollar."

"The Liberals put $1.1 billion of your money into a gas plant project. Then they cancelled it during an election. We know why. It's obvious. They did it for votes," the email said, before soliciting donations to Ford's campaign.

NDP Leader Andrea Horwath said the money lost during the scandal "should have been used for the public good, like helping to fix the hospital overcrowding crisis, rather than being wasted by the Liberals in a selfish attempt to score political points.

"The jail sentence handed down to David Livingston today following his conviction will not bring back the more than $1 billion in public money the Liberals blew to protect their seats ahead of an election, but it does recognize the severity of the Liberal attempt to cover up the gas plant scandal," Horwath continued.