In this file photo dated Sep. 23, 1986, showing the grave of Able Seaman John Hartnell, a crew member of the Arctic expedition led by Captain Sir John Franklin in 1845, embedded in the permafrost soil of Beechey Island, Nunavut, Canada. The British Ministry Of Defense said in a statement Monday Oct. 23, 2017, that it will give Canada the shipwrecks and artifacts of British explorer John Franklin, who tried to chart the Northwest Passage through the Canadian Arctic in 1845, all hands perished in the attempt. (AP Photo, FILE)

Britain announced Monday it will give Canada the shipwrecks of British explorer John Franklin, who perished with his crew while trying to chart the Northwest Passage through the Arctic in the 1840s.

The HMS Erebus and the HMS Terror were found in 2014 and 2016 about 30 miles (48 kilometers) apart near King William Island in the Canadian Arctic, some 1,200 miles (2,000 kilometers) northwest of Toronto.

Under an agreement between the two countries, the wrecks were the property of Britain although Canada had custody and control of them. The U.K. Ministry Of Defense said Monday it would transfer the ownership to Parks Canada, but retain a small sample of artifacts.

British Defense Secretary Michael Fallon said the arrangement “will ensure that these wrecks and artifacts are conserved for future generations.”

Franklin and 128 hand-picked men set out in 1845 to find the passage — a shortcut to Asia that supposedly ran from the Atlantic to the Pacific by way of the Arctic. All of them died, making the voyage the worst tragedy in the history of Arctic exploration.

Historians believe the ships got trapped in thick ice in 1846, and Franklin and some other crew members died in the ensuing months. The survivors apparently abandoned the two ships in April 1848 in a hopeless bid to reach safety overland. Inuit lore tells of “white men who were starving” in the area as late as the winter of 1850.

Dozens of searches by the British and Americans in the 1800s failed to locate the wrecks, and some of those expeditions ended in tragedy, too.

Franklin and his doomed voyage inspired songs, poems and novels, and the ships were among the most sought-after prizes in marine archaeology.

Canada announced in 2008 that it would look for the ships, and the Canadian government poured millions of dollars into the ultimately successful search.