AbstractDue to the improvement in power demand usage, the system causes more stress. Suitable placement of FACTS is introduced to improve power flows, stability, and power system security. An advanced optimal method has been introduced to resolve optimal power flow under various conditions. Five varied FACTS devices were positioned inside the power system to improve system safety at the least cost. Selecting the suitable location and size of FACTS device enabling high security and less cost was proposed using RSA. The objective functions were mitigated based on the RSA's inspiration to improve system security. The placement of the FACTS compensator was based on objective functions like LOSI, voltage deviation, real power loss, investment cost, sensitivity index, fuel costs, and constraints. The proposed model was validated under three conditions, namely generator outage, line outage, and both outage in IEEE 118 and IEEE 30 bus‐systems. In the IEEE 30 bus system, TCSC provides better security of 1.4 severity at normal conditions and 1.3 severity in contingency conditions. In the IEEE 118 bus system, UPFC has less severity of 2.4 at normal conditions, and STATCOM has the least severity of 3 at contingency conditions. The proposed model provides enhanced security in all circumstances and reduces overall costs.