For example, lets say that being a software developer is a legal occupation right now. But 2 years from now, it becomes illegal to develop software.

  • Can you be prosecuted for work that you've done in the past that has only recently become illegal?

  • Are there any legal protections / immunity currently in place to prevent this type of situation?

1 Answer 1


This is known as a retroactive or ex post facto law. Such laws are explicitly forbidden by the US Constitution (Wikipedia reference), and are generally frowned on in jurisdictions where the rule of law applies, partly because it is difficult to prove criminal intent when your action was not at the time criminal.

  • 2
    Obviously any retroactive law could be deeply unfair, but I think in the UK what counts is the intent to do what you did, and not the intent to commit a crime.
    – gnasher729
    Commented Dec 25, 2017 at 13:35
  • 1
    An intent to commit a crime means that you are aware that the act is a crime. I don't think there is any law in the US where one has to actually know that the act is criminal, hence ignorantia legis neminem excusat.
    – user6726
    Commented Dec 25, 2017 at 17:58
  • 1
    -1: many crimes do not even include an element of intent. The more compelling argument against ex post facto laws is that it is manifestly unfair to prosecute someone for an act that was legal at the time of commission.
    – phoog
    Commented Dec 26, 2017 at 3:20
  • 1
    @phoog The simplest crime, theft, requires intent. HOWEVER it does require intent to take something away, not intent to commit a crime.
    – gnasher729
    Commented Dec 28, 2017 at 14:05
  • 1
    @gnasher729 as far as I can see that supports the view that intent is not a particularly important reason to forbid ex post facto laws.
    – phoog
    Commented Dec 28, 2017 at 14:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .