The al-Qaida splinter group — which once controlled much of Somalia — had been considered to be on the run, thanks largely to the peace-making efforts of an African Union military force backed by the U.S. and other western governments.
African troops provided stability for the long-battered country's transitional government, training for security forces and corridors through which humanitarian assistance was able to flow.
It's a complicated and dangerous part of the world where Canada is working in close co-operation with neighbouring nations, Prime Minister Stephen Harper said Monday.
"We do work in close partnership with countries all around the world ... and obviously in parts of the world like that portion of Africa, where there is vulnerability to those kinds of attacks," Harper said.
"Our government is the government that listed al-Shabab as a terrorist entity. We did that in 2010. Obviously, we'll work very carefully with our partners in monitoring developments in this area."
The storming of the Westgate Mall in Nairobi on Saturday left 62 dead, including two Canadians, and scores of others wounded. The terrorist group is said to have deployed between 10 and 15 heavily armed militants in the attack.
Kenyan troops continued to battle militants on Monday, reportedly killing three gunman and freeing several hostages.
Although not a contributor to the United Nations-sanctioned African Union mission, Canada has been watching developments with interest — so much so that now-retired general Walt Natynczyk was given an extensive briefing on the fight against al-Shabab during his time as chief of defence staff.
"Canada is an active observer in the (African Union) and provides both direct and indirect support to the mission," said a heavily censored briefing dated June 14, 2012, obtained by The Canadian Press under the Access to Information Act.
Canada contributed US$5.8 million in 2011 towards logistical support for the military mission, another US$1 million to a UN trust fund to facilitate the delivery of humanitarian assistance, and a further US$520,000 for the international political office in Somalia.
"Indirectly, Canada is engaged in training initiatives through (Directorate of Military Training and Co-operation) to enable (African Union) troop contributing nations through the provision of staff and peace support operations," said the briefing.
That course, delivered twice a year at Camp Aldershot, N.S., involves junior officers from 26 countries who take part in workshops to better equip them to deal with child soldiers fighting in wars throughout Africa.
The Harper government could be doing more, especially in the area of direct training of security forces in Kenya, retired general Rick Hillier told CTV's "Power Play."
"I do think there is a good role that particularly our special forces and our police could play in helping them develop the necessary capabilities to provide their own security, provide their own stability better than they can do now," Hillier said.
The U.S. reportedly provides assistance to Somali intelligence agencies and helps run training camps for Ugandan peacekeepers, who carry the fight directly to al-Shabab. As many as 2,000 U.S. military advisers and specialists are involved in the effort.
U.S. experts have said al-Shabab has been hit particularly hard by the occupation of the town of Kismayo, which is rich in charcoal — a big revenue source for the militants.
The weekend attack appeared to be intended to drive Kenya out of the African Union force, and create a wedge among the four nations involved in the peace-making mission, said retired Canadian major-general Lewis MacKenzie.
"Quite frankly, I'm surprised it has taken so long," MacKenzie said.
"It hasn't surprised me. There are examples from elsewhere when attacks on the homeland resulted in forces being pulled out of a military mission."
While there might be an outcry, the government in Nairobi seems solidly behind the understanding that the more than 20 years of chaos on Kenya's border with Somalia must come to an end, MacKenzie added.
Also on HuffPost