An NDP candidate from southern British Columbia has been pushed out over some "flippant and aggressive" comments he made toward pro-pipeline activists.

Dock Currie was set to represent the party in the Kamloops-Thompson-Cariboo riding, but agreed to bow out Tuesday morning shortly before the writ dropped for the Oct. 21 election.

"I am incredibly disappointed that I won't be able to be the voice to offer a social democratic alternative to the Liberals and Conservatives in the riding," Currie said in a Facebook post addressing his departure.

"I am not stepping down for personal reasons. Rather, I have been asked to step down as a result of problematic social media engagement two years ago, made in a context in which I was a graduate student without any designs on public life."

The former candidate did not offer any further details about the nature of his comments, but said he understood how they could be an "unnecessary and unwarranted" distraction from the NDP's message.

"I want also to make clear that while I regret and apologize for the comments I made to two pro-pipeline activists…I nonetheless disagree with both the content and process of the decision that prevents me from championing these policies that I deeply and passionately believe in," wrote Currie, who is studying law at Thompson Rivers University.

The NDP told CTV News the comments were somehow missed during the party's initial candidate vetting process, but came to light in recent days.

The federal NDP's B.C. director, Glen Sanford, said the comments did not appear on Currie's public channels but were still troubling to the party.

"There was some material in there that was inappropriate for a candidate in an election, and so we talked about him stepping down and he agreed," Sanford said.

The NDP has not announced a replacement candidate for Currie in Kamloops-Thompson-Cariboo, but said there are a number of people giving it "active consideration."

"There won't be anything public until people make a final decision, but that's something to watch for in the coming days," Sanford said.