OTTAWA — Justin Trudeau’s national campaign co-chair is stepping down after he sent a detailed email to people behind the Energy East pipeline with advice on how and when to lobby a new government — including a Liberal minority.

Earlier in the day the Liberals stood by Dan Gagnier, saying he did not break any ethical standards. But in a statement later Wednesday, Gagnier said he didn’t want to be a distraction to the campaign.

“I deeply regret that the campaign has been affected by these negative, personal attacks,” the statement reads.

“I have always conducted my business openly and in full accordance with the rules. In the best interests of the party, I have taken this decision. I continue to support Justin Trudeau and hope for a Liberal government on Oct. 19.”

In a statement of its own, the Liberal party said it respects Gagnier’s decision, but blames the controversy on the Conservatives and their “negative and mean-spirited politics.”

In the email, a copy of which was obtained by The Canadian Press, Gagnier advises five TransCanada Corp. officials to target the right people in a new government as quickly as possible so they can help shape either Liberal or NDP decisions on a national energy strategy.

Such a lobbying effort would be needed to ensure the planned “in-service” dates of projects like Energy East aren’t put at risk, the email said.

Getting this “early entry point” in any revisions to the rules governing the National Energy Board “is sensitive,” but also an opportunity, it continues.

“If the premiers and the new PM want investment and jobs, they will have to provide a lead and an efficient time-frame for getting this done,” Gagnier writes.

Near the end of the message, he notes that energy companies needed to act “uniformly” to work with a new government if the Conservatives lose the election on Oct. 19.

“An energy strategy for Canada is on the radar and we need a spear carrier for those in the industry who are part of the solution going forward rather than refusing to grasp the implications of a changing global reality,” the email reads.

“The last point is critical as federal leadership and a discussion with premiers will take place early. This is where we can play and help them get things right.”

Prior to his resignation, a Liberal spokeswoman said Gagnier’s analysis in the email has “nothing to do with his volunteer role on the campaign,” noting that he didn’t advise Trudeau on energy issues.

“The analysis draws on his years of experience in public service, and is based on publicly available information describing possible scenarios that any new government may face,” Zita Astravas said in an email.

“In all areas, we hold our campaign to the highest ethical standards. I would point out that both the Conservative and NDP campaigns include many consultants.”

Gagnier has spent years in politics, including time working for the Privy Council Office, the central federal bureaucracy that supports the prime minister and cabinet.

He has also worked in the federal Department of Foreign Affairs and was twice chief of staff to former Quebec premier Jean Charest.

With only five days before election day, polls have put the Liberals and Conservatives in a tight race, with the Grits in sight of forming a minority government after Oct. 19.

Under the Constitution, Prime Minister Stephen Harper still has first dibs on forming a government should there be a hung Parliament where no one party has a majority. How that would happen, or how the Liberals or NDP would transition to a new government, is the focus of much of Gagnier’s Oct. 12 email.

Gagnier also writes that a Liberal or NDP government would likely reduce the size of cabinet to about 25 ministers, which would make the finance minister a critical lobbying target.

Lecce dismissed Trudeau and the Liberals as “a party run by elite insiders who sell their influence to the highest bidder to the detriment of taxpayers.”

The argument that anyone could have written a similar analysis doesn’t hold water, said the NDP’s ethics critic, Charlie Angus.

The email suggests Gagnier was “signalling to his friends in ‘Big Oil'” how to get in the good graces of the next government, should it not be Conservative, Angus said.

“It’s a pretty lame excuse when you say anybody could have written this…. No, this was the co-chair of Trudeau’s campaign,” Angus said.

“Anybody could have written that, but nobody would have paid attention to it if a volunteer wrote it.”

A spokesman for TransCanda said it wanted to get some “factual insight” into how to deal with the possible political scenarios that could arise after the election, and that it was provided.

“It is logical to assume that many companies and organizations would take similar steps in preparing for what the political landscape might look like after October 19th,” James Millar said in an email.

“Whatever the outcome and whatever party is in power TransCanada will work with the Prime Minister and his government in a respectful and positive manner.”