Optimal speed references were designed for a trolley crane. The path planning problem was split into five phases: vertical upward movement of the load; acceleration of the trolley while still hoisting the load; horizontal movement of the trolley with maximum velocity without hoisting; deceleration of the trolley while setting down the load; and vertical downward movement of the load. Energy optimal speed references for a given transfer time were computed for the so-called diagonal movements in which the load and trolley moved simultaneously. A dynamical model of the crane mechanics and actuators was used in the formulated optimal control problem. The transfer times for the diagonal movements were made as small as possible so that the given maximal angular velocities of the actuators were not exceeded. Speed references for the three other phases were easily obtained since they involved either hoisting only, or transfer of the trolley with constant velocity without hoisting. A pilot crane experiment with a scaled-down model has been carried out, and the results are given and discussed.