Increased power demand, poor transmission infrastructure, and uncertain renewable generation cause congestion in the power network. Traditionally network congestion is cleared by the system operator by rescheduling generators once every 5-20 min, which may be too slow for grids with renewable generation. Network congestion can be cleared automatically and immediately by a controller. The controller can obtain synchrophasor measurements of line power flow and maintain it at the desired value by controlling some generators and battery energy storage systems (BESS) in real-time. This paper develops an accurate dynamic model of the line power flow. A disturbance compensation based Model Predictive Control (MPC) strategy is proposed to regulate the line power flow at or below the desired value, e.g., thermal limit, in real-time by re-dispatching some generators and/or BESS’s. The MPC technique considers several realistic constraints such as output and rate limits and active power balance in the network. The control strategy is validated on Kundur 4-machine 2-area and 16-machine 68-bus test systems and shown to have better performance as compared to the existing technique. It has been found out that the proposed controller successfully regulates the line power flow within 20-60 s by controlling synchronous generators and within a few seconds by controlling BESS’s.