Tim-Hortons(The Canadian Press)  Tim Hortons is getting a crash course in brand association as it tries to extinguish a controversy over a decision to pull ads for pipeline giant Enbridge.

The company has found itself caught in a tug-of-war of loyalties between environmentalists and oil industry supporters after an online campaign to yank Enbridge commercials from its in-store Tims TV ignited a fury.

Richard Bingham, a marketing professor at Humber College in Toronto, says Tim Hortons should have seen this coming.

He says for years the coffee and doughnut chain has been extraordinarily protective of its brand, mostly associating itself only with community events and charities.

While the introduction of digital screens into its restaurants gave Tim Hortons a new way to pocket revenue through advertising, it also left the impression with some that the company endorses whatever it shows on the screens.

Chris Gibbs, a hospitality professor at Ryerson University in Toronto, says he expects Tim Hortons will take a more cautious approach to in-store advertisements in the future, and the Enbridge controversy will serve as a case study in crisis management.