The optimal control problem of connecting any two trajectories in a behavior B with maximal persistence of that behavior is put forth and a compact solution is obtained for a general class of behaviors. The behavior B is understood in the context of Willems's behavioral theory and its representation is given by the kernel of some operator. In general the solution to the problem will not lie in the same behavior and so a maximally persistent solution is defined as one that will be as close as possible to the behavior. A vast number of behaviors can be treated in this framework such as stationary solutions, limit cycles etc. The problem is linked to the ideas of controllability presented by Willems. It draws its roots from quasi-static transitions in thermodynamics and bears connections to morphing theory. The problem has practical applications in finite time thermodynamics, deployment of tensigrity structures and legged locomotion.