OTTAWA -- The final days of the marathon federal election have revolved around the role of lobbyists in campaigns.

The issue erupted when Liberal campaign co-chair Dan Gagnier abruptly resigned after it was revealed he'd provided TransCanada Corp. this week with advice on how and when to lobby a new -- and possibly Liberal -- government on its controversial Energy East pipeline proposal.

"This is about Liberals trying to feather their own bed," NDP Leader Tom Mulcair declared Friday.

Liberals countered by pointing out that Mulcair's senior campaign adviser, Brad Lavigne, was registered until late last month as a lobbyist in Ontario for the Canadian Fuels Associations, which represents a host of big oil companies, including Chevron, Imperial Oil, Shell Canada and Suncor.

The NDP said Lavigne quit his job as lobbyist and asked to be de-registered last May but, even so, Liberals pointed out he started work on the Mulcair campaign last January, while still employed by Hill and Knowlton.

In the midst of all this backing and forthing, it's worth remembering that no rule or law prohibits lobbyists from being involved in federal campaigns. If they are involved, however, it could severely limit their ability to earn a living as a lobbyist after the election, should their preferred party or candidate win. That's why many lobbyists, who used to be routinely involved in campaigns, now choose to sit on the sidelines.

What the Lobbying Act says: Lobbyists are required to abide by the Lobbyists' Code of Conduct. Rule 8 of the code states that "lobbyists shall not place public office holders in a conflict of interest by proposing or undertaking any action that would constitute an improper influence on a public office holder."

What that means: The commissioner of lobbying, Karen Shepherd has offered guidance to lobbyists about what the law means for their participation in campaigns.

"When a lobbyist carries out political activities, they must consider the risk of creating a sense of obligation on the part of the candidate," she wrote in revised guidelines for political participation last June.

"Should that candidate get elected, he or she would become a public office holder. If that lobbyist were to lobby them once elected, that sense of obligation to the lobbyist may result in a conflict of interest for the public office holder."

What kind of political activity is OK: In Shepherd's view, some political activities by lobbyists are relatively minor and can't reasonably be seen as creating a sense of obligation in a candidate: voting, posting a campaign lawn sign, scrutineering for a candidate, donating to a candidate or party, attending fundraising events and/or speaking on a political panel "when the lobbyist is expressing his or her own views as an individual."

A lobbyist who engages in any of those activities will face no limits on his or her ability to lobby the candidate or any of the candidate's staff after the election.

What kind of political activity is risky: More senior roles in a campaign pose a greater risk of creating the appearance of a conflict of interest should the candidate win election, Shepherd says. Such roles include serving in a paid position on a regional or national campaign, acting as a designated party spokesperson, writing speeches for a party leader, helping a leader prepare for debates, working in a strategic capacity in a party's war room, serving on the executive or board of a candidate's riding association, serving as campaign chair or in another strategic role on a local campaign team and organizing a fundraising event.

"Lobbyists who perform these political activities should recognize that undertaking such activities will mean that they cannot lobby that individual once elected, nor his or her staff," Shepherd says.

In the case of lobbyists who work on regional or national campaigns, she says they should not lobby the party leader or the leader's staff or any other public office holder who may reasonably feel a sense of obligation as a result of the lobbyist's campaign involvement.

So what happens to a lobbyist who gets involved in a campaign: Lobbyists are free to get actively involved, but if their preferred party or candidate wins election, they face a five-year ban on lobbying any public office holders who might feel beholden to them for their campaign efforts.