Abstract: A hydraulic pump or motor includes a body having a chamber and a rotor rotatably mounted within the chamber. The chamber and rotor are shaped to define one or more rise regions, fall regions, major dwell regions and minor dwell regions between walls of the chamber and the rotor. The rotor has a plurality of slots and vanes located in each slot. Each vane is movable between a retracted position and an extended position. In the retracted position, the vanes are unable to work the hydraulic fluid introduced into the chamber whereas they are able to work the hydraulic fluid introduced into the chamber in the extended position. A vane retaining member that is selectively actuable enables the vanes to be retained in the retracted position.