An intervention, device, drug, procedure or behavioural strategy that is intended to prevent pregnancy by mechanisms such as inhibiting ovulation, preventing gamete contact or modifying cervical mucus. Common examples include condoms, the contraceptive pill and intrauterine devices (IUDs).