Can someone be prosecuted for something that was legal when they did it?
<p>This sounds similar to this question, which keeps being used in AI and web search queries:</p>
<p><a href="https://law.stackexchange.com/questions/24971/what-if-i-did-something-that-was-a-crime-but-has-now-become-legal">What if I did something that was a crime, but has now become legal?</a></p>
<p>Can someone be prosecuted for something that was legal when they did it?</p>

<p>In the US <a href="/questions/tagged/usa" class="post-tag" title="show questions tagged &#39;usa&#39;" aria-label="show questions tagged &#39;usa&#39;" rel="tag" aria-labelledby="tag-usa-tooltip-container">usa</a>, at least, the concept of ex post facto laws, which is what you have described, are specifically prohibited:</p>
<blockquote>
<p>Article I, Section 9, Clause 3:</p>
<p>No Bill of Attainder or ex post facto Law shall be passed.</p>
</blockquote>

<p><a href="/questions/tagged/germany" class="post-tag" title="show questions tagged &#39;germany&#39;" aria-label="show questions tagged &#39;germany&#39;" rel="tag" aria-labelledby="tag-germany-tooltip-container">germany</a> <a href="/questions/tagged/united-states" class="post-tag" title="show questions tagged &#39;united-states&#39;" aria-label="show questions tagged &#39;united-states&#39;" rel="tag" aria-labelledby="tag-united-states-tooltip-container">united-states</a></p>
<p><strong>Yes, but only in some jurisdictions, and only under special circumstances.</strong></p>
<p>What you describe is the retrospective application of a law that didn't exist when the action was committed. The legal term is <a href="https://en.wikipedia.org/wiki/Ex_post_facto_law" rel="noreferrer"><em>ex post facto law.</em></a>.</p>
<p>In most jurisdictions laws can not be applied retroactively. In the U.S., the constitution forbids <em>ex post facto law</em> both on the federal (Article I, Section 9, Clause 3: &quot;No Bill of Attainder or ex post facto Law shall be passed&quot; and state (Article I, Section 10, Clause 1: &quot;No State shall [...] pass any [...] ex post facto Law&quot;) level. In Germany, Art. 103 Abs.2 stipulates: &quot;Eine Tat kann nur bestraft werden, wenn die Strafbarkeit gesetzlich bestimmt war, bevor die Tat begangen wurde.&quot; (&quot;An act can only be punished if it was punishable by law before the act was committed.&quot;)<sup>1</sup></p>
<p>The rationale is the very <em>raison d'etre</em> of codified law, namely <em>legal certainty.</em> An individual must ideally be able to determine whether an action is legal or not, at the time they want to commit it. The prospect of future law changes which change the legality retroactively puts the individual in a state of legal insecurity, the exact opposite of what codified law strives to achieve. This very basic consideration makes the non-retroactivity a correspondingly strong principle.</p>
<p>However, in Germany and probably other civil law jurisdictions, this principle finds its limits where its legal consequences are perceived as unbearably unjust. A relatively recent exception was made in the 1990s when GDR border guards were tried who killed fugitive unarmed GDR citizens. Some of them were convicted even though GDR law at that time probably made the killings legal. For example, the shooters were commended and received bonuses.</p>
<p>The convictions were challenged in the constitutional court which <a href="https://www.bundesverfassungsgericht.de/SharedDocs/Entscheidungen/DE/1996/10/rs19961024_2bvr185194.html" rel="noreferrer">ruled</a>:</p>
<blockquote>
<ol start="2">
<li><p><strong>Das strikte Rückwirkungsverbot des Art. 103 Abs. 2 GG findet seine rechtsstaatliche Rechtfertigung in der besonderen Vertrauensgrundlage, welche die Strafgesetze tragen, wenn sie von einem an die Grundrechte gebundenen demokratischen Gesetzgeber erlassen werden.</strong></p>
</li>
<li><p><strong>An einer solchen besonderen Vertrauensgrundlage fehlt es, wenn der Träger der Staatsmacht für den Bereich schwersten kriminellen Unrechts die Strafbarkeit durch Rechtfertigungsgründe ausschließt, indem er über die geschriebenen Normen hinaus zu solchem Unrecht auffordert, es begünstigt und so die in der Völkerrechtsgemeinschaft allgemein anerkannten Menschenrechte in schwerwiegender Weise mißachtet. Der strikte Schutz von Vertrauen durch Art. 103 Abs. 2 GG muß dann zurücktreten.</strong></p>
</li>
</ol>
</blockquote>
<p>To paraphrase: The criminal code can only be trusted, and the prohibition of a retroactive application according to Art. 103 Abs. 2 GG is only applicable, if the law has been enacted by a lawful democratic government. This trust in the law is lacking when a government encourages most serious crimes and thusly flagrantly disregards generally acknowledged human rights. In such cases, the strict trust established by Art. 103 Abs. 2 GG must stand back.</p>
<p>In this decision, the constitutional court explicitly referred to the &quot;<a href="https://en.wikipedia.org/wiki/Radbruch_formula" rel="noreferrer">Radbruch formula</a>&quot;,</p>
<blockquote>
<p>a legal theory which was first formulated in a 1946 essay by the German law professor and politician Gustav Radbruch. According to the theory, a judge who encounters a conflict between a statute and what he perceives as just, has to decide against applying the statute if – and only if – the legal concept behind the statute in question seems either &quot;unbearably unjust&quot; or in &quot;deliberate disregard&quot; of human equality before the law.</p>
</blockquote>
<p>Radbruch had developed this position in 1946 under the impression of the Nazi crimes. Its applicability to GDR crimes was debated. While everybody agreed that the Nazis were objectively evil and unlawful, the assessment of the GDR government was less clear. The constitutional court decided that it was objectively unlawful enough that the border guards should have been able to realize that their actions were objective crimes, regardless of the positive law.</p>
<hr />
<p><sup>1</sup>The common exception is that a <em>milder</em> later law takes precedence over the stricter law valid at the time of the action. The rationale is obvious: It would be perceived as unjust to continue a criminal trial,  e.g. for smoking pot a couple years ago, while outside the courtroom the prosecutor is sharing a joint with his friends.</p>

<p>mostly <a href="/questions/tagged/germany" class="post-tag" title="show questions tagged &#39;germany&#39;" aria-label="show questions tagged &#39;germany&#39;" rel="tag" aria-labelledby="tag-germany-tooltip-container">germany</a> and <a href="/questions/tagged/european-convention-on-human-rights" class="post-tag" title="show questions tagged &#39;european-convention-on-human-rights&#39;" aria-label="show questions tagged &#39;european-convention-on-human-rights&#39;" rel="tag" aria-labelledby="tag-european-convention-on-human-rights-tooltip-container">european-convention-on-human-rights</a></p>
<p>This is covered by the legal principle <em><strong><a href="https://en.wikipedia.org/wiki/Nulla_poena_sine_lege" rel="noreferrer">nulla poena sine lege praevia</a></strong></em> (no punishment without prior law) or equivalently, the banishment of <em>ex post facto</em> laws. This is encoded in Section 1 of the German Criminal Code (<a href="https://www.gesetze-im-internet.de/stgb/__1.html" rel="noreferrer">German</a>, <a href="https://www.iuscomp.org/gla/statutes/StGB.htm#1" rel="noreferrer">English</a>):</p>
<blockquote>
<p>Eine Tat kann nur bestraft werden, wenn die Strafbarkeit gesetzlich bestimmt war, bevor die Tat begangen wurde.</p>
<p>An act may only be punished if its punishability was determined by law before the act was committed.</p>
</blockquote>
<p>However, the <em><strong><a href="https://en.wikipedia.org/wiki/Radbruch_formula" rel="noreferrer">Radbruch formula</a></strong></em> is a principle that overrides this. It briefly states that existing law must be ignored if it is unbearably unjust. It has been applied to prosecute (and sentence) deeds committed in Nazi Germany and East Germany that were arguably legal in those jurisdictions. As far as I can tell, it has been last applied in 2004 against GDR politicians for ordering the shooting of people fleeing the GDR across the German–German border.</p>
<p>Something similar is encoded in <a href="https://en.wikipedia.org/wiki/Article_7_of_the_European_Convention_on_Human_Rights" rel="noreferrer">Article 7 of the European Convention on Human Rights</a>:</p>
<blockquote>
<h3>No punishment without law</h3>
<ol>
<li>No one shall be held guilty of any criminal offence on account of any act or omission which did not constitute a criminal offence under national or international law at the time when it was committed. Nor shall a heavier penalty be imposed than the one that was applicable at the time the criminal offence was committed.</li>
<li>This Article shall not prejudice the trial and punishment of any person for any act or omission which, at the time when it was committed, was criminal according to the general principles of law recognised by civilised nations.</li>
</ol>
</blockquote>
<p>This encodes <em>nulla poena sine lege praevia,</em> but also an exception for cases where law clashes with fundamental principles.</p>

<p><a href="/questions/tagged/canada" class="post-tag" title="show questions tagged &#39;canada&#39;" aria-label="show questions tagged &#39;canada&#39;" rel="tag" aria-labelledby="tag-canada-tooltip-container">canada</a></p>
<p><a href="https://www.justice.gc.ca/eng/csj-sjc/rfc-dlc/ccrf-ccdl/check/art11g.html" rel="noreferrer">Section 11(g) of the <em>Canadian Charter of Rights and Freedoms</em></a> says that any person charged with an offence has the right:</p>
<blockquote>
<p>not to be found guilty on account of any act or omission unless, <strong>at the time of the act or omission, it constituted an offence</strong> under Canadian or international law or was criminal according to the general principles of law recognized by the community of nations</p>
</blockquote>

<p>In <a href="/questions/tagged/france" class="post-tag" title="show questions tagged &#39;france&#39;" aria-label="show questions tagged &#39;france&#39;" rel="tag" aria-labelledby="tag-france-tooltip-container">france</a>, per <a href="https://www.legifrance.gouv.fr/codes/article_lc/LEGIARTI000006417180/" rel="nofollow noreferrer">article 112-1 du code pénal</a>:</p>
<blockquote>
<p>Sont seuls punissables les faits constitutifs d'une infraction à la date à laquelle ils ont été commis.</p>
<p>Peuvent seules être prononcées les peines légalement applicables à la même date.</p>
<p>Toutefois, les dispositions nouvelles s'appliquent aux infractions commises avant leur entrée en vigueur et n'ayant pas donné lieu à une condamnation passée en force de chose jugée lorsqu'elles sont moins sévères que les dispositions anciennes.</p>
</blockquote>
<p>Which DeepL translates into:</p>
<blockquote>
<p>Only acts constituting an offence on the date they were committed are punishable.</p>
<p>Only the penalties legally applicable on the same date may be imposed.</p>
<p>However, the new provisions apply to offences committed before their entry into force and which have not given rise to a conviction that has become res judicata when they are less severe than the old provisions.</p>
</blockquote>
<p>This can be summarised as &quot;non-rétroactivité de la loi pénale&quot;, which means you cannot be charged for something you committed before the law came to exist.</p>
<p>As far as I know, there are only two exceptions to that:</p>
<ul>
<li>If you were in the process of being prosecuted for something which was already forbidden and a new law decreed a reduced sentence, you shall benefit from it. Example: if you were to be condemned to death sentence, and a new law abolished it, then you will no longer be sentenced to death.</li>
<li><a href="https://en.wikipedia.org/wiki/Crimes_against_humanity" rel="nofollow noreferrer">Crimes against humanity</a> is a notion that came to existence only after the events of World War II. Even so, you can be prosecuted for crimes you committed even before the laws existed, per <a href="https://www.legifrance.gouv.fr/codes/article_lc/LEGIARTI000006417551/2000-09-21" rel="nofollow noreferrer">article 213-5 du code pénal</a>:</li>
</ul>
<blockquote>
<p>L'action publique relative aux crimes prévus par le présent titre, ainsi que les peines prononcées, sont imprescriptibles.</p>
</blockquote>
<p>Translated by DeepL into:</p>
<blockquote>
<p>There is no statute of limitations on the prosecution of the crimes provided for in this Title, nor on the penalties imposed.</p>
</blockquote>

<p>In theory, if a law changed at midnight, Jan 1st, and you committed something that changed from non-crime to crime or vice versa, just around midnight, you could be prosecuted. The prosecutor would have to prove beyond reasonable doubt not only that you did the act, but also that you acted on the wrong side of the time of the law change. So far that is normal, if the prosecutor sees a good chance to convict you, they will take you to court, and sometimes they lose.</p>
<p>But courts get it wrong sometimes, so you <em>might</em> even be convicted when you shouldn't be. For example if you committed an act at 15 minutes past midnight, and a witness claims they say you do it 15 minutes before midnight - and doesn't realise their watch stopped.</p>

criminal-law ex-post-facto