ex post fac ‧ to law /ˌeks pəʊst ˈfæktəʊ ˌlɔː $ -poʊst ˈfæktoʊ ˌlɒː/ BrE AmE noun [countable] law
[ Date: 1700-1800 ; Language: Latin ; Origin: 'from a thing done afterward' ]
a law that makes a particular action into a crime, and then punishes people who took that action before it had legally become a crime