Ex post facto is a Latin term meaning 'from after the action' and refers to laws that apply retroactively, affecting actions that were performed before the law was enacted. These types of laws can either criminalize actions that were legal at the time they were committed or increase the penalties for crimes after they were committed. The principle behind ex post facto laws is to protect individuals from being punished under new laws that they could not have anticipated.