In this study, the concentration of major and trace elements was measured in rainwater samples to identify their possible sources. From January to April 2014, in Hamedan province, west of Iran, 23 rainwater samples were collected from one urban station and two rural stations. The volume-weighted mean (VWM) was 0.38, 0.88, and 0.52 meq L−1 for calcium and 0.42, 0.35, and 0.44 meq L−1 for magnesium in Hamedan, Kushkabad, and Nematabad stations, respectively, indicating that the above cations were dominant in these areas. Rainwater samples in the Hamedan station showed the lowest pH value with a VWM of 6.38 due to the lowest amount of neutralizing ions. The results indicated that calcium and magnesium were the key contributors to acid rain neutralization in all three stations. Although zinc had the highest concentration in the rainwater samples, the calculated crustal enrichment factor showed that cadmium had maximum enrichment factors in three stations. Because of the more anthropogenic activities, Hamedan station had the highest concentration of trace elements. The crustal enrichment factors showed that cadmium, nickel, and zinc were obtained primarily from anthropogenic activities and that iron, manganese, potassium, calcium, and magnesium may have originated from terrestrial sources.