Bartonellae are emerging vector-borne pathogens infecting various domestic and wild mammals. Blood samples were collected from 66 dogs at two locations near Hamedan, Iran. Twenty dogs were rescued stray dogs and 46 dogs were from a breeding colony, with many of them infested with fleas, ticks, or lice. Serology was performed using an indirect immunofluorescent antibody test for Bartonella henselae, Bartonella clarridgeiae, and Bartonella vinsonii subsp. berkhoffii. Seroprevalence was 74.2% (range: 65.2-95%). Bartonella DNA amplification and sequencing identified B. vinsonii subsp. berkhoffii type III in seven dogs, including five rescued dogs. Two dogs were infected with Bartonella rochalimae and three dogs with Candidatus B. merieuxii, including two of the stray dogs coinfected with Bartonella vinsonii subsp. berkhoffii. Rescued stray dogs were 10 times (odds ratio (OR) = 10.13, 95% CI: 1.24-82.7; P = 0.03) more likely to be seropositive and eight times (OR = 8.82, 95% CI: 2.68-29.11; P = 0.0004) more likely to be flea-infested than breeding dogs, confirming that arthropod infestation is a major risk factor for these infections.