This paper introduces a hybrid algorithm combining firefly and particle swarm optimization (HFPso) to optimize the sizing of distributed generation (DG) and distribution static compensator (D-STATCOM) for voltage stability in distribution systems. It aims to improve voltage stability, enhance voltage profiles, and minimize power loss through simulations on standard IEEE 33-bus and Iraqi 65-bus systems, demonstrating significant improvements over existing methods. The study highlights the effectiveness of HFPso in achieving global optimum solutions for these applications.