One sunny winter morning last year, Tom Flanagan got in his car to drive back to Calgary from the University of Lethbridge, where he had given a talk the night before. The topic was the Indian Act, and the crowd, which included a number of native activists, had been unusually hostile. Still, he felt he'd handled it well. "I was feeling quite relaxed," he recalls.

As he should have. When Mr. Flanagan started the two-hour drive, he was a respected political scientist and author, a sought-after commentator in the media with a regular spot on CBC Television, and an effective Conservative political activist who had once served as Prime Minister Stephen Harper's chief of staff.

Before the drive was halfway over, he was a pariah. He would be denounced by the Prime Minister's Office and other former political allies. By the end of the day, his employer of 45 years, the University of Calgary, would trash him. The CBC would fire him as a commentator. In the days to come, he would be disinvited from speaking engagements across North America.

Story continues below advertisement

All were reacting to a video clip from the Lethbridge talk that had been posted on YouTube. In it, Mr. Flanagan is seen responding to a question from out of the blue about child pornography. The headline on the cellphone video was: "Tom Flanagan okay with child pornography."

He had said no such thing. But the clip – or rather, the headline – ignited a media firestorm. When people couldn't reach him right away, they didn't bother to wait to react. Mr. Flanagan's car phone rang – a rare event, since hardly anyone had the number. On the line were two men who worked for Danielle Smith, the leader of the Wildrose Party. Mr. Flanagan had worked hard to help build Ms. Smith's fledgling party into a credible political force in 2008. But now, they told him coldly, he was through. She was cutting him off and about to issue a public denunciation.

The Prime Minister's communications director, Andrew McDougall, took care of it with a tweet. "Tom Flanagan's comments on child pornography are repugnant, ignorant, and appalling," it said.

Mr. Flanagan was used to controversy. He is widely loathed among aboriginal activists for acting as an expert government witness in land-claim cases. Along with Mr. Harper, he was one of the signatories of the notorious "firewall" letter that called for Alberta to cut itself off from Ottawa and keep all its wealth in-province. He enjoyed flaunting his enormous buffalo-skin coat on TV, just to tweak the easterners. He proudly calls himself a natural contrarian.

But this was different. Nobody in power had bothered to speak with him. He never had a chance to defend himself. He was the victim of a ruthless politics of expediency that would almost destroy him – a politics he now ruefully admits was partly of his own creation.

The return of human sacrifice

Mr. Flanagan's new book, Persona Non Grata: The Death of Free Speech in the Internet Age, is remarkably free of revenge or bitterness. "Writing the book was not for me a therapeutic or emotional thing," he told me. "It was only through writing the book that I came to an understanding of what happened."

Story continues below advertisement

The most powerful theme of his book is a how a changing political culture has interacted with new media to create a toxic environment in which people are executed in the public square when they become inconvenient. "Damage control is a big part of politics today," he says. "There's a demand for virtually instantaneous action. So human sacrifice has become institutionalized."

Twenty years ago, there would have been no story, no incident. There were no cellphones to capture casual remarks, no YouTube to post them on. If Mr. Flanagan's comments had somehow come to light, reporters would have called him to get his side of the story. The PMO would have responded with a measured, formal statement, not a tweet.

But there's no time for that any more. The news cycle has been shortened to the speed of Twitter. Clickbait journalism rules the day. Institutions are pressured to react before they understand the situation. And all it takes to turn an innocent person into a folk devil is a tweet from somebody in power.

"The signal was out there that we need to pile on this person for the sake of decency." Mr. Flanagan says. "And the political leaders showed the way."

As well, the media – even the legacy media – like nothing better than blood on the floor. "The whole media becomes like those Internet tabloids," he says.

But Mr. Flanagan never dreamed that he might be the target. He left federal politics years ago. Although he is still closely linked with Mr. Harper in the public mind, they haven't spoken in ages. He does not like what politics, or the party, have become.

Story continues below advertisement

Perhaps this explains the rueful subtext that runs through his book, one I also heard in our conversation: Tom Flanagan played a part in what politics has become. As an architect of Mr. Harper's party, he was complicit in the cultivation of a climate of ruthlessness that put the PM into power and has kept him there.

The iron law of this political culture is that you do whatever it takes to win. People and principles are expendable. Dissent is not tolerated. Policies are props that are fashioned to appeal to voters. Everything is evaluated through the prism of whether it will help or hurt the leader.

Today, Mr. Flanagan writes, "I have to accept my share of blame" for the ruthlessness that characterizes the party. Originally, Conservatives like him thought it was the only way to beat the Liberals at their own game.

"Harper led the way, but everyone around him bought into it," he says. In part, that ruthlessness reflects what he calls the "shadow side" of Mr. Harper's personality. But it is also "a cancer eating at the whole Conservative movement in Canada."

That is an extraordinary indictment of the party Mr. Flanagan helped to create. And it feels prophetic. Even long-time supporters agree that the politics of brutal expediency have dealt a blow to public discourse and made the party widely loathed. By the usual reckonings – widespread economic prosperity, to name one – Mr. Harper should be able to hold onto his job as long as he wants. But the majority of recent polls show his party trailing the Liberals, or tied at best. His governing style is corrosive. And people know it.

Nobody should take too much joy in that, though. Mr. Flanagan thinks the other parties are going the same way. All are trapped in the same poisonous dynamics. If the penalty for dissent or error is public execution, who will want to serve? "This is not good for democracy," he says.

Story continues below advertisement

'Gotcha, Tom'

After he got the call in his car from Danielle Smith's people, Mr. Flanagan pulled off the road and turned his iPad on. He read the statement issued by Ms. Smith: "There is no language strong enough to condemn Dr. Flanagan's comments," it began, and said the party would no longer have anything to do with him.

This betrayal was the one that hurt the most. Ms. Smith had been a student of his. He had mentored her; they had been close. "I virtually put my life on hold for two years to manage her campaign and help her get ready," he says. "And she didn't even pick up the phone and talk to me." It's obvious that she hurt him deeply. His protégée had learned the lessons of political ruthlessness all too well. To this day, they haven't spoken.

The University of Calgary's reaction surprised him too. He expected the administration would issue the usual bland statement defending academic freedom. But politicians (including Alberta's minister for higher education) were demanding his head on a pike. Instead of shielding him, the university issued a panicky statement insinuating that Mr. Flanagan's views were repugnant and that he was being forced into early retirement, which wasn't true. The president, Elizabeth Cannon, has since apologized to him.

For the record, Mr. Flanagan does not condone child pornography in any form. Nor has he ever said he does. What got him into trouble was an offhand remark that was deliberately torqued out of context.

Mr. Flanagan was targeted that night in Lethbridge by a group of native activists who were out to get him. They had dug up an old comment of his from a university talk in which he tried to distinguish between crimes that involve the abuse of actual children and those that involve "just pictures." One man confronted him with this remark and another captured his response on his cellphone.

Story continues below advertisement

Instead of shutting up, Mr. Flanagan plunged right in. "I certainly have no sympathy for child molesters," he said, then added, "It is a real issue of personal liberty to what extent we put people in jail for doing something in which they do not harm another person …"

Bingo. On the recording, a voice says, "Gotcha, Tom."

"I got in trouble for violating the political correctness of conservatism, which holds that anyone who looks at images of child pornography is a dangerous pervert who must be imprisoned for a substantial term," he writes.

Needless to say, that's a hard discussion to have in Canada today. The subject is radioactive. Personally, I think Mr. Flanagan has a point. For example, he is not sure that a mandatory three to six months in jail (the current penalty) is necessary for someone caught with an obscene Japanese comic book. But most people aren't interested in the fine points.

Mr. Flanagan, now 70, says he is largely recovered from the trauma of "the incident." Not everybody turned against him. He was flooded with expressions of support. (Few, he notes, came from anyone in government.) Thoughtful columnists across the country came out on his side. A leading publisher offered him a contract for the book. He never stopped writing for this newspaper, to which he is an occasional contributor. Preston Manning, who had initially joined in the mobbing, apologized and has since made a point of "reintegrating" Mr. Flanagan at public events.

Last summer he retired from the university, as planned. He has written another book and is still teaching a course and writing academic articles. But he is chastened. The arrogant Tom Flanagan, the one who relished hacking and slashing at the liberal elites, the admitted "godfather" of Conservative negative advertising, is gone. This man is more reflective. He has been made to take stock. And he doesn't like everything he sees.

Story continues below advertisement

At the beginning of his book is a Bible verse, from Jeremiah, which I asked him to explain to me. It reads:

Then I went down to the potter's house, and there he was, making something at the wheel. And the vessel that he made of clay was marred in the hand of the potter; so he made it again into another vessel, as it seemed good to the potter to make.

"That's actually the key to the book," he said. "I was at church and the priest quoted this. And something clicked in my mind: I was the vessel."

Maybe God is the potter, he suggests, or maybe the potter is the sum of the events that make up a person's life. It doesn't really matter. "The vessel is the life I had up to that point, and it had gone in a certain way but it wasn't quite adequate. And so the vessel had to be remade."

The worst experience of his life has been his redemption, in a way. That's something else he never expected.