The grisly and mysterious tale of two British ships that disappeared in the Arctic in 1845 has baffled generations and sparked one of history's longest rescue searches. But now, more than 160 years later, Canadian divers have finally found the remains of one of the doomed Navy vessels.

Legend has it that sailors on board the HMS Erebus and HMS Terror, who were chosen by the explorer Sir John Franklin, resorted to cannibalism after the ships became ice-bound in the Victoria Strait in the Arctic territory of Nunavut.

Search parties hunted for the crew until 1859, but no sign of either ship was discovered until now. However, tantalising clues have emerged over the years, including the bodies of three crewmen, discovered in the 1980s.

The Franklin expedition's mission to the fabled Northwest Passage had frustrated explorers for centuries and the sea crossing was only successfully made 58 years later, far further north. The original search expeditions in the 19th century helped open up parts of the Canadian Arctic for discovery.

Canadian divers and archaeologists rekindled efforts to find the ships in 2008 as the government looked to assert its sovereignty over the Northwest Passage.

Announcing the find, Canadian prime minister Stephen Harper said: "This is truly a historic moment for Canada. This has been a great Canadian story and mystery and the subject of scientists, historians, writers and singers, so I think we really have an important day in mapping the history of our country."

"Franklin's ships are an important part of Canadian history given that his expeditions, which took place nearly 200 years ago, laid the foundations of Canada's Arctic sovereignty," he said.

An image of the discovery shows the wooden vessel has remained largely intact, though the main mast has been sheared off. The ship was resting upright on the sea bed only 11 meters below the surface. Searchers used remotely operated underwater technology to find the ship on Sunday, although it remains unclear which of the two vessels it is. The discovery comes shortly after divers found an iron fitting from one of the boats.

The myths surrounding the Franklin expedition have helped make the vessels among the most sought-after prizes in marine archaeology.

Experts believe the crews abandoned the two ships in a doomed bid to find help after both of their ships became locked in ice near King William Island.

The remains of the crew were hard to find because they wandered for hundreds of miles over the ice and, at the time, the Inuit gave conflicted accounts of the directions they took. However, over the years traces of 70 crew members have been found.