TORONTO -- Tim Hortons is getting a crash course in brand association as the company tries to extinguish the fracas over its 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 Tims TV in-store digital screens ignited a fury.

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

"Part of what Tims has striven for is the sort of brand that is not going to get drawn into controversy, not going to get drawn into politics, and is really careful at staying away from any potential pain points," he said.

"Anything that gets beyond a person handing you your coffee and you sitting down to enjoy it ... anything that gets into a political realm is something they don't want to touch with a barge pole."

For years, the coffee and doughnut chain has been extraordinarily protective of its brand, mostly associating itself only with community events and charities, but the introduction of digital screens into the retail industry opened up a new revenue stream.

Tims began quietly experimenting with Tims TV last spring before rolling out the screens at restaurants across the country. The company, which was recently acquired by the owner of Burger King, described the platform as its own version of a community space, serving as a home for the latest news, weather, local events and branded videos.

The main thrust of the concept was to pocket revenues from what's essentially a billboard inside the restaurants. Advertisers could buy screentime in the looping rotation of content.

Tim Hortons said the channel, a partnership with the media division of Cineplex, would advertise "complementary" brands like food and automotive companies, but Tims TV has also left the impression with some customers that the company endorses whatever is shown on the screens.

Earlier this week, 29,000 people signed an online petition calling for Tim Hortons to pull advertisements for Enbridge, the oil company behind the Northern Gateway pipeline project.

When the company agreed to the demands, it almost instantly agitated oil industry supporters who quickly took to Twitter with the hashtag .BoycottTims.

The pressure hasn't let up.

On Friday, an ardent group of about 20 oil industry supporters gathered outside a Tim Hortons in downtown Calgary to send a message to executives. Some waved signs in support of Enbridge while others proudly sipped from the coffee cups of competitors like Second Cup and Starbucks.

Local paramedic Don Sharpe came dressed in overalls and a hard hat and waved a Canadian flag as he pledged to stay away from Tim Hortons coffee.

"I won't drink it if they're going to knuckle under a group of people that want to crush them with some sort of petty leftist boycott," he said. "It makes me furious, I find it abhorrent."

Gail Thorne called herself a loyal Tim Hortons customer, but said she refuses to return to the chain until the Enbridge ads return to Tims TV.

"They should be supportive of all industries, not just listening to a couple whining environmentalists that have, I think, bullied them into pulling the ads," she said.

Chris Gibbs, a hospitality professor at Ryerson University in Toronto, said retailers need to understand consumers have different expectations of media companies, which creates a potentially dangerous mixture when the two industries combine.

"It was the perfect storm," he said. "As the economy in Alberta dips and people are out of jobs, they're going to get more protective of the oilsands industry and the jobs it creates. If this would've happened at the height of oil (prices), I don't think you would've seen this reaction."

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

With files from Ian Bickis in Calgary