OTTAWA

Prime Minister Stephen Harper took aim at rookie Liberal leader Justin Trudeau Wednesday for failing to harshly condemn the Boston bombings while saying governments should ponder the reasons behind these acts.

"When you see this kind of violent act, you do not sit around trying to rationalize it or make excuses for it or figure out its root causes," Harper said, speaking to journalists in London, where he attended the funeral for Margaret Thatcher.

"You condemn it categorically, and to the extent that you can deal with the perpetrators, you deal with them as harshly as possible, and that is what this government would do if it ever was faced with such actions."

In an interview on CBC's The National Tuesday, Trudeau was asked how would he -- if he were prime minister -- handle a similar incident.

The neophyte leader said beyond "any material immediate support" Canada should "look at the root causes."

"But there is no question that this happened because there is someone who feels completely excluded, completely at war with innocents, at war with a society. And our approach has to be, okay, where do those tensions come from?" he said.

On Wednesday, following his first caucus meeting on Parliament Hill, Trudeau ducked a question on what those root causes might be.

He offered his "tremendous sympathies," adding: "Obviously we have to make sure, as we move forward, we look at creating a safe community, a safe country, a safe world for all citizens, all individuals -- and that happens with security and with a significant commitment to peace."

He later stormed out of question period and accused Harper of "lashing out" at him personally and politicizing the Boston tragedy.

But terrorism expert Wesley Wark, of the University of Toronto, said "the truth of the matter is nobody knows" what spurs someone to commit these acts.

"There are all kinds of circumstances that lead to this," he said. "Virtually every case is unique in some ways."

Wark said there's no such thing as "perfect security," but the best way to prevent these types of attacks is advance warning through good intelligence, which includes developing trusted ties with communities, religious and ethnic groups and among individuals where extremists may lurk.

Law enforcement has yet to discover who was behind Monday's deadly attacks at the Boston marathon that killed three people and injured more than 170.