Transmission line loss minimization in a power system is an important research issue and it can be achieved by means of reactive power compensation. The unscheduled increment of load in a power system has driven the system to experience stressed conditions. This phenomenon has also led to voltage profile depreciation below the acceptable secure limit. The significance and use of Flexible AC Transmission System (FACTS) devices and capacitor placement is in order to alleviate the voltage profile decay problem. The optimal value of compensating devices equires proper optimization technique, able to search the optimal solution with less computational burden. This paper presents a technique to provide simultaneous or individual controls of basic system parameter like transmission voltage, impedance and phase angle, thereby controlling the transmitted power using Unified Power Flow Controller (UPFC) based on Bacterial Foraging (BF) algorithm. Voltage stability level of the system is defined on the Fast Voltage Stability Index (FVSI) of the lines. The IEEE 14-bus system is used as the test system to demonstrate the applicability and efficiency of the proposed system. The test result showed that the ocation of UPFC improves the voltage profile and also minimize the real power loss.