There are several threats that require the control of the conditions of switching operations in the transmission grid. They result mainly from the negative effects of the high-value current, which may appear after the breaker is closed. Problems considering closing the power circuit breakers on a large standing phase angle (SPA) are often formulated by grid operators. The literature most often discusses the problem of SPA reduction, which allows the system to be restored without the risk of damaging the turbogenerator shafts. This reduction can be achieved by various operational solutions; most often, it is the appropriate adjustment of active power generation, sometimes backed up by partial load shedding. The subject of the presented article is a slightly different approach to the SPA problem. The method of determining the maximum value of SPA for which the connection operation allows to avoid excessive transitional torques was presented. With this approach, finding the maximum value of SPA between the two considered system nodes is treated as an optimisation task. In order to solve it, the original heuristic optimisation method described in the article was applied.