How Spain found the gems in the junk pile