HALIFAX -- HMCS Windsor sailed into port in Halifax on Thursday after 105 days in the North Atlantic, making it the longest deployment for the Victoria-class subs that have been beset by mechanical problems and costly repairs.

Family members waving small Canadian flags and 'welcome home' posters lined the waterfront jetty under grey skies and a cool breeze as the sub steamed into the harbour, escorted by HMCS Charlottetown.

Rear Admiral John Newton greeted the vessel and its 60 crew members, who deployed for the multinational combat readiness exercises on Labour Day.

"This has been a long, planned mountain we've climbed," Newton said, referring to earlier problems with one of the sub's generators and travel restrictions linked to a broken system.

"But everything about the boat -- the crew, the readiness, the weapons, the sonar, the engines, the stealth -- is working 100 per cent."

Windsor, along with HMCS Athabaskan, Halifax, Montreal, Goose Bay and Summerside, left in the fall to participate in the exercises with navies from several countries, including Britain, France, Portugal and the U.S.

The sub patrolled the North Atlantic, moving from northern Scotland down to waters off Spain as part of operations dubbed Trident Juncture and Joint Warrior.

"Normally these submarines work detached from these surface forces, but we took this sub into our task force as part of the overall combat system and that was a big success," said Newton.

Lt.-Cmdr. Peter Chu, the sub's commanding officer, said the operation gave his crew a rare chance to test how its systems work with other vessels and they did about 50 exercises with other navies, 22 of which were submarine-based.

"When you're dealing with NATO countries and the different sort of warships and submarines at a very, very high level, Canada doesn't get this opportunity very much from a submarine perspective," he said.

"We're training submariners and producing new submariners."

For some, it was one of their longest missions at sea.

Master seaman Matthew Larkin, 30, said it was a challenging, but rewarding exercise that saw few hiccups.

"It was a great trip and good experience, but it's good to be home," he said, holding his 2.5-year-old son while his wife cradled their five-month-old daughter.

Windsor has had limited time at sea since the federal government acquired it and three other long-range, diesel-electric submarines from the Royal Navy in 1998. It spent five years in a refit from 2007 until the middle of 2012 and is due to undergo another lengthy major workup in 2017.

Three of the subs are operational following years of setbacks, including a fire aboard HMCS Chicoutimi in 2004 on its first Canadian voyage that killed Lt. Chris Saunders and sent two others to hospital.

HMCS Corner Brook hit the ocean floor during training exercises off Victoria in June 2011 and is expected to be out of service for repairs until at least 2017.