ex post facto law
A law intended to apply to crimes or events that took place before its passage. The United States Constitution forbids the passage of ex post facto criminal laws, on the principle that it is wrong to punish an act which was not illegal when committed.