Does the prohibition against ex post facto laws apply if a law has been enjoined by a court?

Let’s say California passes a law making it illegal to sell widgets. The California Widget Makers Association sues and a court issues an injunction stopping the law from taking effect.

If I sell a widget while the law is enjoined and, later, the law is upheld, can the state prosecute me for selling a widget?

Also, does this apply equally to civil as well as criminal issues?

I don’t think it’s terribly clear, but the general answer should be “yes.” A injunction (particularly a preliminary injunction) does not enjoin “a law”. A court has no ability to “strike down” a law and the law remains unless and until repealed by the legislature. The court enjoins certain individuals (usually executive branch officials) from enforcing a law.

I think that the generally rule is that, if the final judgment dissolves the injunction, the state court prosecute any violation that occurs, subject to the limitations period.

Here is a longish article discussing what you’re talking about – what the author calls the “writ of erasure fallacy”. The argument makes sense to me, although I’m not sure that the footnotes clearly support the thesis at times.

Edit: It’s possible that there could be a “mistake of law” defense to the criminal, depending on the jurisdiction.

Makes sense.

However, I thought the point of an injunction was to prevent irreparable harm from occurring before the case can be decided by the court.

So, if my business is widget sales and I can be prosecuted for selling widgets while the injunction is in place (assuming the law is upheld), the harm is still done. Unless I want to take the risk of going to jail (probably not) I need to stop selling widgets. Given how long these cases can take that would quite likely put me out of business.

IANAL…just my understanding.

Well, the injunction to prevent the harm from occurring if you win.

If the widget prohibition law is upheld, then it was the prerogative of the state to prohibit widget sales from whatever date the legislature saw fit to enact.

It’s part of the reason why you need to show a likelihood of success on the merits.

IDK about the original question but just want to point out that the prohibition against ex post facto laws applies only to criminal cases.