One of HMCS Ville de Québec's four diesel generators caught fire while at the Halifax dockyard, according to Maritime Forces Atlantic.

Around 3 p.m. Thursday, the ship's engineer detected the fire and activated a sprinkler system within the generator's steel enclosure. The fire was quickly contained.

A diesel generator caught fire around 3 p.m. Thursday when the ship was being tested for combat readiness. ((Pte. Johanie Maheu/DND))

Spokesman Capt. Cameron Hillier said HMCS Ville de Québec recently completed a Halifax-class upgrading program. The ship was going through a series of tests to ensure its combat readiness when the fire occurred.

"HMC Dockyard fire department arrived on scene to confirm that the fire was extinguished," he said. "And crew is to continue overhaul procedures just to simply make sure that the fire won't reignite."

The three crew members who were first on the scene were sent to hospital as a precaution in case of smoke inhalation.

Hillier says "there's no damage assessment with what's been done to the diesel generator," but there will soon be an investigation into the fire's cause.