TORONTO -- The deletion of thousands of documents related to the politically explosive decision to cancel two gas plants near Toronto was a deliberate act that breached the public trust, the trial of two former top aides in the Ontario premier's office heard Friday.

The long-awaited and delayed trial began with the prosecution outlining the case against David Livingston and Laura Miller, and the defence chipping away at whether a critical Crown witness could be qualified as an expert.

Livingston, the chief of staff to former Ontario premier Dalton McGuinty, and Miller, his deputy, have pleaded not guilty to charges of breach of trust, mischief, and unlawful use of a computer.

In her unproven opening statement, prosecutor Sarah Egan said the accused were responsible for the "double deletion" of sensitive emails about the power plants as a way to keep them secret and thwart the public's right to accountability and transparency.

"Acting together, they destroyed records that they had a legal duty to preserve," Egan told Ontario court Judge Timothy Lipson. "They acted contrary to the public interest."

The Ontario Liberal government's decision to shut the power plants in Oakville and Mississauga just before the 2011 provincial election -- and the $1.1-billion cost incurred -- had become an issue of "intense public scrutiny" that prompted requests for relevant data under freedom of information laws, court heard.

In fact, the Ministry of Energy had been found in contempt of the legislature in 2012 after it failed to turn gas-plant documents over to a legislative committee that had asked for them.

Livingston, who had been "painstakingly" warned about his obligations to preserve the documents, nevertheless decided to wipe the information from computers in the office of then-premier McGuinty, court heard.

"(Livingston) did this to ensure there was nothing to be turned over," Egan said.

Their decision to engage Miller's information-technician spouse, Peter Faist, to wipe hard drives was a "serious and marked departure" from the standards of public trust for the positions they held, the prosecutor said.

Faist, she said, was not a government employee and did not have the required security clearance to access the computer system.

Egan stressed the trial was not about the controversy over the costs or wisdom of the gas-plants decision, which she said were merely a backdrop to the actions that led to the charges against the accused.

Following Egan's statement, the prosecution called its opening witness: Robert (Bob) Gagnon, a retired Ontario provincial police officer with experience in computer forensics.

Gagnon would testify how emails were deleted from the accused's government mail boxes in the summer and fall of 2012 and that thousands of documents were deleted in early 2013 from computers in the premier's office, the prosecution said.

But the defence immediately raised objections over his designation as an expert witness, suggesting he was too close to the investigation to be impartial.

Miller's lawyer, Scott Hutchinson, questioned Gagnon about his lengthy and active role in the investigation, dubbed Project Hampton, and his interactions with Crown lawyers.

From the start of the probe, court heard, Gagnon sat in on numerous conference calls and meetings as investigators -- former colleagues at the Technical Crimes Unit -- discussed the case. He was given a provincial police email address and kept in frequent contact with team members.

Among other things, court heard, he offered the officers advice on various search warrants, and provided questions to be put to witnesses, including Faist.

His contribution during a police interview with Faist, which he watched from a separate room, was to help clarify any technical answers, Gagnon testified.

The hearing continues Monday with arguments over Gagnon's expert status, with the crucial decision up to Lipson. The judge said he would need a day or two to decide after Monday's submissions.

"Your ruling is important in terms of the case," co-prosecutor Tom Lemon told him. "It does have consequences."

Other expected Crown witnesses include Livingston's former executive assistant, the secretary of cabinet and other staff in the premier and cabinet offices.

The trial, slated to last six weeks, was to have started hearing witnesses on Sept. 11. However, the hearing was put over until Friday when the defence complained about late and incomplete information the Crown was obliged to hand over.