Hybrid energy systems are an excellent solution for electrification of remote rural areas where grid extension is not easy and expensive. Such sys¬tem incorporates a combination of one or several renewable energy sources such as solar photovoltaic, wind energy, micro-hydro and conventional generators for backup. The present paper discusses different system components of hybrid energy system and develops a general model to find an optimal combination of energy components for a typical rural community, minimizing capital cost, net present value and cost of energy. The simula¬tion study and the optimization of hybrid energy system are based on a computer program known as HOGA, as simulation tool. From the economic analysis, the different types of system configuration were established. Optimal operation has a unit cost of 0.23 € kW 1 h 1 with the selected hybrid energy system, being 100 % renewable energy contribution, finishing with the need of a conventional diesel generator. Results from the study will be useful to help decision making and to choose the most appropriate system for the communities