– More than 1,000 years ago, a Viking hoard of gold jewelry, coins and silver bars was buried for ­safekeeping.

The trove stayed hidden until 2015, when two men dug up it up in a field in Eye, near the town of Leominster, in western England.

On Friday, the men — George Powell, 38, and Layton Davies, 51, both from Wales — were handed lengthy prison terms.

The men, who used metal detectors to unearth the coins, were punished for failing to follow Britain’s rules on reporting discoveries of treasure. Instead, they hid some of the items, estimated to be worth millions of pounds, and sold others to dealers. The pair were sentenced at Worcester Crown Court on Friday on charges of theft, conspiracy to conceal criminal property and conspiracy to convert criminal property.

Powell received 10 years, and Davies was sentenced to 8½ years. Two other men, Simon Wicks and Paul Wells, were also convicted Thursday on a charge of concealment for their involvement in the case.

Powell and Davies were not punished for discovering the historically significant trove. In fact, rewards are often given to people who find treasure in Britain.

Judge points out the irony

The judge told Powell and Davies that the “irony in the case” was that if they had followed the correct procedure, they might have been in line to receive up to half the value between them, the BBC reported. “But you wanted more,” the judge told them.

According to the Treasure Act in Britain, anyone who believes they have found a metal object more than 300 years old is required to report it to the authorities within two weeks. A judgment is then made on whether the discovery meets the definition of “treasure.” Later, a valuation would be given, rewards may be offered and museums have the chance to claim the objects.

Instead of following the rules, Powell and Davies kept quiet and soon began selling the valuable coins to private collectors.

The hoard, a mix of ninth- and 10th-century objects, included Anglo-Saxon coins, a gold ring and gold band, silver bars, and a crystal rock pendant, according to a police.

Photographs of the artifacts in a freshly dug hole were found deleted on Davies’ phone by the authorities.

Despite a yearslong investigation, only 30 of the 300 coins the men are thought to have found have been recovered, in addition to some pieces of jewelry and a silver ingot.

The rest is missing

The rest of the treasures are missing, presumed hidden or sold, according to West Mercia Police, the force that covers much of western England.

Because so much of the hoard has not been recovered, it has been difficult to estimate the true value. One collector who bought 16 of the coins estimated the trove as worth more than 3 million pounds, or about $3.8 million.

Experts said the objects would have offered a unique window on a crucial moment of British history.

Among the ancient coins that have been recovered are some rare “Two Emperor” examples that show a previously unknown alliance between the rulers of Mercia and Wessex, two early ­kingdoms.

“This is a really important moment in history,” said Gareth Williams, curator of early medieval coins and Viking collections at the British Museum. “The coins have given us a changed understanding of history.”

In an interview on Friday, Williams lamented the fact that the rest of the coins had not yet been found.

“It is entirely possible that there are other rarities in the missing part of the hoard,” he said.

“If we do not recover the missing items,” Williams added, “these men have not just stolen the objects, but they are stealing our history too.”