OTTAWA - Prime Minister Stephen Harper says Canada stands with Norway after at least 16 people were killed in an explosion in Oslo and shooting at a youth camp.

Harper said he was "shocked and intensely saddened," and that Canada condemns the acts of violence.

The prime minister said Canadians' thoughts and prayers are with the victims, witnesses and all those affected.

Police in Norway say a man arrested after the youth camp shooting is likely also linked to the Oslo bombing.

There were no details about the man, who was dressed in a police uniform when he opened fire.

An unconfirmed report suggests as many as 25 may be dead at the camp.

At least seven people were killed earlier in the bombing at a government building in Oslo.

The attacks occurred just hours before the last commander of Canada's combat mission in Afghanistan, Brigadier-General Dean Milner, and some 117 soldiers returned home to Ottawa.

Defence Minister Peter MacKay said the bombings and shootings in Norway "demonstrate that the world is still a very volatile place" in which military and security forces play a vital role.

"We have to remain vigilant in Canada," MacKay told reporters after welcoming the soldiers home.

"In so doing, we also express our solidarity and support for those who have lost loved ones in Norway and we commit ourselves as a country to work with them and our allies in doing all we can to protect citizens around the globe."

Canada committed troops to a NATO mission in Afghanistan following the 9/11 terrorist attacks on New York's World Trade Centre and the Pentagon in Washington. At the time, Afghanistan was a failed state that had become a breeding ground for extremist Islamic terrorism.

While NATO allies claim significant progress has been made in stabilizing Afghanistan and rooting out Taliban insurgents, the country is still wracked by violence as the last of Canada's combat troops leave. Nor has the mission stopped terrorist attacks in other corners of the globe, including Norway.

"I think you have to very much steel yourself to the reality (that), like crime, terrorism remains a plague," said MacKay.

While Afghanistan is no longer a hub for exporting terrorism, he acknowledged: "It is not a perfect world. It would be naive to think that somehow we are going to be able to pre-empt and predict where terrorists will strike again."

MacKay it's "unusual" to see such blatant terrorist attacks in a country like Norway but that should remind Canadians that no country is immune.

"It's also sobering for a country like Canada that shares values with Norwegians and a demonstration of ... the volatility that's still there, the vigilance that we have to demonstrate and persevere and work together to try to find the root causes but also try to pre-empt and interrupt these types of attacks."