As a novel effective approach to nonlinear optimization problems, the Trust-Tech method is applied to solving the optimal power flow(OPF) problem. The proposed method consists of two phases: PhaseⅠ locates the feasible solutions for OPF problem by searching the stable equilibrium point of the quotient gradient system corresponding to the constraints set, and the idea of active set is employed to deal with the inequality constraints so that the computational requirement can be reduced; PhaseⅡ reduces the feasible region by adding the extra inequality constraints with respect to the upper limit of the objective function into the original OPF problem. By alternating between the two phases, the proposed method can locate the optimal solution for OPF problem by gradually decreasing the upper limit of the objective. Numerical results of a number of test systems are given to demonstrate the effectiveness of the method.