Michael Bociurkiw is a global affairs analyst and a former spokesperson for the Organization for Security and Cooperation in Europe. A native of Canada, he has written for the Globe & Mail, the Winnipeg Free Press and frequently comments on Canadian television. The opinions expressed in this commentary are his; view more opinions on CNN.

(CNN) There was a jarring sense of déjà vu last week in Canada as images of yet another attack on innocent civilians in Toronto played out on newscasts. A reportedly mentally ill man went on a gun rampage on Sunday evening in Toronto's popular Danforth neighborhood, killing two people and injuring 13 others. The attack occurred less than three months after a man drove a van into pedestrians in another busy part of Toronto, killing 10 people.

And those were just in 2018. In January 2017, in Quebec City, a man using a restricted firearm killed six people and injured others. And in September of that year, in Edmonton, a man carried out a stabbing and van attack, injuring five.

According to Toronto police , up to half of the guns on the streets of Toronto are smuggled in from the US, and the Canada Border Services Agency is routinely seizing illegal firearms at the Canada-US border. ( Media reports say the semi-automatic handgun used in last week's Sunday shooting originated in the US, although Canadian-sourced illegal firearms arms are a big part of police seizures as well).

And these stories are not just anecdotal. According to the Canadian government, the number of homicide victims killed by firearms has been steadily increasing over the last three years. With gun violence on the rise in North America's fourth-largest city, the government of Prime Minister Justin Trudeau must now contend with growing calls for a crackdown on guns in Canada where, unlike in the US, people do not have a constitutional right to bear arms.

The surge in violence on Canadian streets adds to the list of issues Trudeau is going to have to deal with as he prepares for a federal election next year. Just three years into his mandate, the photogenic Trudeau must juggle a host of controversies that have hurt his popularity. Introducing a possible handgun ban in response to the violence and adding a new post for "border security and organized crime reduction" in a cabinet shuffle on July 18 are some of the ways Trudeau is getting battle ready.

But it will take more than that. With his protracted honeymoon over, Trudeau must project himself less as a Prime Minister known for viral selfies and more as a decisive leader willing to stand up to external threats. That may require a shakeup of his own team to prioritize issues management and damage control.

His focus should be on what he can control, starting with curbing the flow of migrants crossing into Canada. Ottawa is also under growing pressure from provincial premiers and big city mayors who say they are overwhelmed with the burden of caring for new migrants who can languish for years as they grind their way through Canada's notoriously clogged immigration processing system. Last year alone, more than 20,000 "irregular" asylum seekers were intercepted by police along the US-Canada border. These are individuals who have either transited through the US or have already claimed asylum in the US and use a loophole to cross into Canada where the chances of staying are much higher (all the while receiving such benefits as free health care, shelter and work permits).

Little of what the government has done so far has plugged the loophole, and if the northward flow continues, the Trudeau government could be forced to make the entire border off limits to those who don't use official crossings. Although images of distressed asylum seekers from Nigeria and Haiti may not play well on TV in an election season, cracking down on what some Canadians regard as queue jumpers would have little political downside.

Tough language, a cabinet shuffle and making Canadians feel safer. But with just a little over a year to go before voters head to the polls, is this too little, too late?

Recent public opinion polls seem to indicate a bumpy road ahead for Trudeau, who came into office at 43 with little political experience but good looks, charm and a weighty legacy as the son of Pierre Trudeau, Canada's third-longest serving prime minister.

According to CBC's poll tracker , which incorporates several public opinion surveys, with a spread of less than 1%, if an election were held today, the Liberals would either be defeated or end up with a minority government.

Considering that in 2015 the Liberals achieved the largest-ever seat gain in a Canadian election, the plunge in popularity is nothing short of stunning.

Many trace the pivot point back to the Prime Minister's disastrous week-long, state visit to India last February, when he was widely ridiculed for dressing his entire family in traditional Indian attire. (As Sun Media's Adrienne Batra put it , the India visit featured more wardrobe changes than a Cher concert). Further damage came first from revelations that a convicted terrorist, Jaspal Atwal, had been invited to two events with the Prime Minister, and then from suggestions from an official in Ottawa that factions in the Indian government had sabotaged Trudeau's visit.

With an election on the horizon, the disastrous India visit is expected to make for explosive campaign ammunition. "The Tories will play and re-play the India trip dress-up that went down very badly. The lesson being, don't combine family trips with state visits," said Colin Robertson, a former diplomat and vice president of the Canadian Global Affairs Institute

JUST WATCHED Justin Trudeau addresses groping allegations Replay More Videos ... MUST WATCH Justin Trudeau addresses groping allegations 00:57

But also looming in the background, and considered by pundits as legitimate election fodder, are groping allegations against Trudeau from 18 years ago that have just become public and which many feel have been insufficiently addressed by the Liberal leader, who's branded himself as a fierce defender of women, even booting a Liberal MP from the cabinet for allegedly calling a woman "yummy" almost a decade ago. Having raised the ethical bar so high, and yet possibly unable to live up to his own standards, the gap will almost certainly be played by political opponents as evidence of hypocrisy. As for Trudeau, he has gone on the record saying he has no recollections of the incident but added, "I respect the fact that someone else might have experienced that differently."

Then there is a questionable environmental record, damaged by the government's billion dollar bailout of a controversial pipeline that would bring oil from Alberta, via British Columbia, to Pacific Ocean ports. The nationalization of the US energy firm Kinder Morgan's pipeline has already generated heated protests in BC and has called into question Trudeau's green credentials. And it could get worse -- a lot worse -- should environmental activists and aboriginal groups block construction bulldozers. Ottawa political analyst Yaroslav Baran told me "At the end of the day, if there are First Nations protesters chained to the pipeline right of way, Mr. Trudeau won't have the guts to send in the army to remove them."

But, as Canadians prepare for the next election, Trudeau may benefit from an unlikely source: President Donald Trump. In the past weeks, the Trump team has mercilessly taunted Trudeau and rallied against Canada for everything from unfair trade practices to disagreements at the G7 summit in Quebec. Trudeau has been fiercely standing up for Canada -- or donning the "Captain Canada hat" as Baran puts it -- which in turn has been giving him a slight boost in the polls.

Follow CNN Opinion Join us on Twitter and Facebook

And with every anti-Canada or anti-Trudeau tweet, it's the gift that could keep on giving for the Trudeau camp. "The federal government's firm but polite pushback against an increasingly combative Donald Trump on the international stage is playing well politically for the Trudeau government," said Shachi Kurl, executive director of the Angus Reid Institute of Vancouver.

But, as she and others pointed out, if job layoffs, especially in the auto sector, start to occur as a result of the trade disputes, the going could get really tough for the Trudeau government. He may need to get relief from punitive tariffs from Trump -- similar to what the EU achieved last week -- all the while shoring up the Canadian economy against growing competition from a super-charged US economy.