Resumen: Nowadays, the trend of countries and their electrical sectors moves towards the inclusion of renewable distributed generators (RDGs) to diminish the use of the fossil fuel based DGs. The solar photovoltaic-based DG (PV-DG) is widely used as a clean and sustainable energy resource. Determining the best placements and ratings of the PV-DG is a significant task for the electrical systems to assess the PV-DG potentials. With the capability of the PV-DG inverters to inject the required reactive power in to the system during the night period or during cloudy weather adds the static compensation (STATCOM) functionality to the PV unit, which is being known as distributed static compensator (DSTATCOM). In the literature, there is a research gap relating the optimal allocation of the PV-DGs along with the seasonal variation of the solar irradiance. Therefore, the aim of this paper is to determine the optimal allocation and sizing of the PV-DGs along with the optimal injected reactive power by their inverters. An efficient optimization technique called Gorilla troop’s optimizer (GTO) is used to solve the optimal allocation problem of the PV-DGs with DSTATCOM functionality on a 94 bus distribution network. Three objective functions are used as a multi-objective function, including the total annual cost, the system voltage deviations, and the system stability. The simulation results show that integration of PV-DGs with the DSTATCOM functionality show the superiorities of reducing the total system cost and considerably enhancing system performance in voltages deviations and system stability compared to inclusion of the PV-DGs without the DSTATCOM functionality. The optimal integration of the PV-DGs with DSTATCOM functionality can reduce the total cost and the voltage deviations by 15.05% and 77.05%, respectively. While the total voltage stability is enhanced by 25.43% compared to the base case.