BackgroundDespite the progress made on policies and programmes to strengthen primary health care teams’ response to Intimate Partner Violence, the literature shows that encounters between women exposed to IPV and health-care providers are not always satisfactory, and a number of barriers that prevent individual health-care providers from responding to IPV have been identified. We carried out a realist case study, for which we developed and tested a programme theory that seeks to explain how, why and under which circumstances a primary health care team in Spain learned to respond to IPV.MethodsA realist case study design was chosen to allow for an in-depth exploration of the linkages between context, intervention, mechanisms and outcomes as they happen in their natural setting. The first author collected data at the primary health care center La Virgen (pseudonym) through the review of documents, observation and interviews with health systems’ managers, team members, women patients, and members of external services. The quality of the IPV case management was assessed with the PREMIS tool.ResultsThis study found that the health care team at La Virgen has managed 1) to engage a number of staff members in actively responding to IPV, 2) to establish good coordination, mutual support and continuous learning processes related to IPV, 3) to establish adequate internal referrals within La Virgen, and 4) to establish good coordination and referral systems with other services. Team and individual level factors have triggered the capacity and interest in creating spaces for team leaning, team work and therapeutic responses to IPV in La Virgen, although individual motivation strongly affected this mechanism. Regional interventions did not trigger individual and/ or team responses but legitimated the workings of motivated professionals.ConclusionsThe primary health care team of La Virgen is involved in a continuous learning process, even as participation in the process varies between professionals. This process has been supported, but not caused, by a favourable policy for integration of a health care response to IPV. Specific contextual factors of La Virgen facilitated the uptake of the policy. To some extent, the performance of La Virgen has the potential to shape the IPV learning processes of other primary health care teams in Murcia.Electronic supplementary materialThe online version of this article (doi:10.1186/s12913-015-0899-8) contains supplementary material, which is available to authorized users.