 An illegal contract that is void cannot be enforced—this is called the "ex turpi" rule—but the illegal part of an otherwise legal contract can be severed from the rest of the contract depending on the probable intention of the parties.If there has been performance on the void contract, in principle restitution should be granted, but the "par delictum" rule bars restitution where parties are equally morally guilty.This rule can be relaxed to see justice between the parties, depending on the facts of the case.