This paper addresses the optimal placement of static Var compensators (SVCs) in a transmission network in such a manner that its loading margin is maximized. A multi scenario framework that includes contingencies is considered. This problem is formulated as a nonlinear programming problem that includes binary decisions, i.e., variables to decide the actual placement of the SVCs. Given the mixed-integer nonconvex nature of this problem, a Benders decomposition technique within a restart framework is used. Detailed numerical simulations on realistic electric energy systems demonstrate the appropriate behavior of the proposed technique. Conclusions are duly drawn.