Providing electricity to rural regions is difficult for developing countries, such as Iraq, particularly in remote parts without grid connections. The electrical demands of Zerbattiya, a community in southern Iraq near the Iranian border, are discussed in this paper. The proposed system includes wind turbines, solar panels, diesel engines, batteries, etc. This study suggests a techno-economic viable and optimal size for each component to generate electricity for this area. This research uses particle swarm optimization techniques (PSO). The best hybrid renewable energy system (HRES) design is achieved by balancing the lowest possible cost of energy (COE) with the lowest possible loss of power supply probability (LPSP) and the greatest possible reliability factor value. As a result of the findings, the respective ideal values of number of photovoltaics (NPV), number of wind turbines (NWT), number of diesel generator (NDG), number of batteries (NBT), COE, LPSP, and reliability are 138, 43, 2, 324, US$/KWh 0.129, 0.0508%, and 99.9492%, respectively. Finally, it was discovered that implementing a HRES is an effective way to address the electrical demands of remote rural regions in Iraq and other developing countries with similar climates.