Abstract-This paper studies the optimal control of trajectories converging to or escaping from a stable equilibrium. The control duration is assumed to be short. When the control is turned off, the trajectories have not reached the target and they subsequently evolve according to the free motion dynamics. In this context, we show that the problem can be formulated as a finite-horizon optimal control problem which relies on the notion of isostables. For linear and nonlinear systems, we solve this problem using Pontryagin's maximum principle and we study the relationship between the optimal solutions and the geometry of the isostables. Finally, optimal strategies for choosing the magnitude and duration of the control are considered.