In law, affinity may be used to prohibit incestuous sexual relations. It may also be relevant in preventing some couples from marrying. Which relationships are prohibited varys from country to country, and from time to time. In some countries, especially in the past, the prohibited relationships were based on religious laws. In earlier laws, affinity was used in the same degrees as consanguinity in prohibiting marriages.