The clock is ticking for Western powers to intervene militarily against ISIS in Libya — and Canada has a responsibility to join a potential mission there, says NATO's former supreme allied commander.

"If we're going to have an impact in Libya, now is the time to get involved, over the next six months," retired U.S. navy admiral James Stavridis said on CBC News Network's Power & Politics.

"We have to act before the Islamic State becomes even stronger … otherwise we're going to have another massively failed state on the periphery of Europe."

As Libya marks the fifth anniversary of its revolution on Wednesday, the country remains torn by civil war, while ISIS continues to expand amid the political vacuum left behind after limited intervention by Western powers in 2011.

"It is extremely important that we confront the Islamic State in Libya. That's the clear and present danger," said Stavridis, who oversaw NATO's operations in Libya in 2011.

Learn from Syria

The path forward for Western military intervention could lie with the United Nations, Stavridis told Power & Politics host Rosemary Barton.

"We should see if we can get a UN Security Council resolution to build a peacekeeping force, a reasonable-sized ground peacekeeping force, because that is what we did not do last time," he said.

"We had a very effective air campaign [in Libya], we had a very effective arms embargo and we did a good job at protecting the people of Libya, but we didn't put any kind of mission on the ground that could build stability into the problem."

Stavridis, who is now dean at the Fletcher School at Tufts University in Massachusetts, said Canada and the U.S. could learn a lesson from the crisis in Syria.

"Look back at Syria two years ago, when I think we had a chance — if we had moved with more alacrity," he said.

"Compare that to where we are in Syria today. Things can fall apart with unbelievable speed, in only 24 months."

Military training key

Stavridis also weighed in on Canada's new role in the anti-ISIS coalition, telling Barton that although Canada's CF-18s were "very effective," they can be replaced by other countries bringing jets into the fight.

Canada will triple its contributions of military trainers — a part of the mission Stavridis called "perhaps the most important" aspect of the fight.

"As the NATO commander I had responsibility for our massive training mission in Afghanistan, and I saw our Canadian Forces work across the full spectrum from all-out combat to doing the training missions," he said.

"They can perform across the entire spectrum. Where Canada chooses to use them is a decision for Canadians," he said.

"Where I see a strong contribution from Canada would be on the training side of the mission — the seam between soft and hard power," Stavridis said, pointing to the training commitment and increased humanitarian aid set out by the Liberal government.

"I think it's a place where the Canadian Forces will continue to do a very good job. They're terrific wherever they go."