This study investigated the association between unintended pregnancy and intimate partner violence before pregnancy. A cross-sectional study was carried out with 1,054 women, aged 18 to 49, in Recife, Northeastern Brazil, from July 2005 to March 2006. Non-conditional logistic regression analysis was performed with a hierarchical strategy for entering variables into the model, according to the conceptual framework defined. Unintended pregnancy was reported by 60.3% (636) women. Intimate partner violence prior to the pregnancy was associated with unintended pregnancy (ORadj = 1.57; 95%CI: 1.17-2.11), even when adjusted for the women's sociodemographic characteristics, the partner's behaviour, and the relationship dynamic. When the association was adjusted for the use of contraception and the partner's refusal to use contraception, the association was no longer significant, suggesting that the effect of partner violence on unintended pregnancy may be mediated by these variables. The findings point to the need of screening for intimate partner violence in reproductive health services.