This research proposes a methodology for minimizing losses in transmission lines (LT), considering the reconfiguration of the architecture of the electrical power system (SEP). The implementation of this methodology redirects the power flow with optimal switching through its LTs to guarantee the stability of the voltage, angle, frequency, and power balance to minimize losses that affect the reliability and quality of the system. Optimal transmission switching (OTS) allows various types of analysis to be carried out, where the loadability of the lines, response times, and operating costs, among others, can be improved. This article proposes to minimize the losses in the transmission lines with the OTS by using AC power flows as a mixed integer nonlinear problem (MINLP). Several test scenarios evaluate the method’s effectiveness, determining the optimal topology for corrective control that optimizes power flows in different situations. It has been proven that this approach reduces losses compared to a base case by 99%, even in the face of N-1 or random contingencies, without losing load, maintaining the same active power dispatch, and finally verifying a strategic increase in dispatch of reactive power to maintain operating parameters within stable limits.