Suppose you live in a region where the government has banned the purchase of some media (e.g., songs, movies, or software). So you cannot legally purchase licenses from the owners; the only way to obtain them is on the black market where copies are pirated.
If you take a pirated copy to a region where it is not illegal to purchase it, is it then legal to possess and use the media?