The manipulation of small objects with light has become an indispensable tool in many areas of research, ranging from physics to biology and medicine1–7. Here, we demonstrate how to implement micromanipulation at the optimal level of efficiency for arbitrarily shaped targets and inside complex environments such as disordered media. Our approach is to design wavefronts in the far field8–15 with optimal properties in the near field of the target to apply the strongest possible force, pressure or torque as well as to achieve the most efficient focus inside the target. This non-iterative technique only relies on a simple eigenvalue problem established from the system’s scattering matrix and its dependence on small shifts in specific target parameters (access to the near field of the target is not required). To illustrate this concept, we perform a proof-of-principle experiment in the microwave regime, fully confirming our predictions.