Prime Minister Justin Trudeau faced questions from a raucous Calgary crowd Tuesday night with attendees angrily demanding answers for how he'd help the troubled oilpatch, and if he'd rescind his comments about "phasing out" the oilsands.

Roughly 1,700 people — many of them students — showed up to see the prime minister at the University of Calgary, his first Alberta stop on his cross-country tour after a three-day cabinet retreat. The proceedings were dominated by talk of Donald Trump's inauguration, the impact of the new president's protectionist rhetoric on NAFTA, and his memorandum on TransCanada's Keystone XL pipeline.

VIDEO | Watch the full town hall with Justin Trudeau at the bottom of this story

One questioner acknowledged the inherent risks of a Liberal prime minister hosting a town hall in Calgary where attendees were not vetted or pre-screened.

"Thank you for stepping into the lion's den here in Alberta," the man said. "I know I appreciate it."

A few voices in the crowd frequently peppered the prime minister with heckles.

"As a teacher, I try not to reward bad behaviour by giving them too much attention," Trudeau said of those who interrupted the events.

An elderly man seated in the last row of the crowd persistently badgered the prime minister throughout the event, asking him if he had ever gone without a meal, and made other inaudible comments about Fidel Castro and Chinese Communists.

The man's frequent outbursts irritated members of the crowd who routinely told him to sit down and be quiet.

Prime Minister Justin Trudeau gets a rough ride from the crowd during his town hall 1:41

During one tense moment, towards the end of the event, a man in the audience, Merle Terlesky, stood up angrily and demanded the prime minister answer what he planned to do for the province's troubled oilsands.

Trudeau said he would not respond to outbursts, while a group of girls shouted "We love you Justin," as the prime minister stood down the man.

Trudeau ultimately relented and took a question from Terlesky — who was wearing a shirt that says "I love the oil sands" — after pleas from some in the crowd.

"You cannot come to this province and attack the single biggest employer," Terlesky said, adding he was disgusted by Trudeau's remark in Peterborough, Ont., last week that the oilsands should be eventually be "phased out."

Terlesky accused him of inconsistency and demanded a retraction, stating: "You are either a liar or you're confused, and I'm beginning to think it's both."

Trudeau, who had conceded earlier today before the town hall event that he had "misspoke" in Peterborough, pressed forward, at one point admonishing the crowd for interrupting his attempt to answer.

Prime minister reaffirms he's a feminist and says he will stand up for Canadian principles and values 1:25

"The greatest responsibility of any prime minister is to get our resources to market and yes that includes the oilsands," the prime minister said in response, while noting he would not abandon his commitment to protecting the environment for future generations.

At one point, an impassioned Trudeau asked the crowd to raise their hands if they believe in climate change, and virtually everyone in the audience did so.

"We have to manage the transition off fossil fuels," Trudeau said, while noting even former prime minister Stephen Harper said the country would have to commit itself to "decarbonization."

Trudeau championed his government's approval of two major pipeline projects, Kinder Morgan's Trans Mountain and Enbridge's Line 3, comments which were met with the loudest applause from the audience.

Trudeau told another questioner that he will "keep showing up" in the province, even if most of the province's seats are held by Conservatives.

He said he's proud to have four Liberals MPs in his caucus from the province.

"But, we want more, we want more proud, strong Albertans to stand up. We don't accept that you're automatically a Conservative province," he said.

Justin Trudeau faces testy crowd in defending his case for the oilsands 1:53

'Go back to teaching drama'

The line-up for entry snaked around the sprawling university centre, pushing back the start time by more than an hour as visitors were screened, while others were turned away at the door.

There was a smattering of protestors outside the venue. Some wielded signs with unflattering expressions scrawled in permanent marker, including "Go Back to Teaching Drama," a reference to Trudeau's past teaching career, "Lock Him Up," an ode to chants directed at Hillary Clinton during the last presidential election campaign, and one that said "Kevin O'Leary for Prime Minister."

Prime Minister Justin Trudeau takes questions at a town hall meeting in Calgary, Alta. Trudeau faced tough questions from the audience about comments he made about phasing out Canada's oilsands. (Jeff McIntosh/Canadian Press)

He mostly played to the hometown crowd in his opening address, acknowledging the struggles Calgary has faced in recent years with the downturn of oil prices.

"Alberta is struggling, and has been struggling for the past few years. I know there is strength and resilience here," he said. "Canadians are here for Albertans and will help you through these difficult times."

He did face a question from one attendee about what he would do to avoid a Standing Rock-like protest situation in Canada if opposition to pipeline projects mounts.

The prime minister said the regulatory process is much different in Canada than in the U.S., and his government engaged with Indigenous people along the Trans Mountain route prior to giving its consent.

Trudeau has faced criticism for some responses he's made at town halls like this one. In addition to his offhand comment that Canada would "phase out" the oilsands, he insisted last week on answering in French to an English-language question in Sherbrooke, Que.