The aim of this study was to assess the association between promotion, protection, and support for breastfeeding in primary health care services and prevalence of exclusive breastfeeding in the first six months of life. A cross-sectional study was conducted in a representative sample of 1,029 mothers of infants younger than six months treated at primary health care facilities in the city of Rio de Janeiro, in southeastern Brazil. Prevalence ratios (PR) were estimated by Poisson regression. Prevalence of exclusive breastfeeding was 58.1%. Factors associated with increased prevalence of exclusive breastfeeding were: white skin color (PR = 1.20; 95%CI: 1.05-1.36); schooling (PR = 1.19; 95%CI: 1.05-1.35); marital status (married or in common-law marriage) (PR = 1.72; 95%IC:1.02-2.90); previous breastfeeding (PR = 1.27; 95%CI: 1.08-1,49); exclusive breastfeeding at the time of hospital discharge (PR = 2.01; 95%CI: 1.20-3.36); group support for the mother (PR = 1.14; 95%CI: 1.01-1.28); and orientation on breastfeeding (PR = 1.20; 95%CI: 1.08-1.33). Prevalence of exclusive breastfeeding decreased 17% per month in the infant's life. Support groups and orientation by primary health care for breastfeeding were associated with increased exclusive breastfeeding prevalence.