An apparatus for converting between mechanical and electrical energy, particularly suited for use as a compact high power alternator for automotive use and “remove and replace” retrofitting of existing vehicles. The apparatus comprises a rotor with permanent magnets, a stator with a winding, and a cooling system. Mechanisms to prevent the rotor magnets from clashing with the stator by minimizing rotor displacement, and absorbing unacceptable rotor displacement are disclosed. The cooling system directs coolant flow into thermal contact with at least one of the winding and magnets, and includes at least one passageway through the stator core. Various open and closed cooling systems are described. Cooling is facilitated by, for example, loosely wrapping the winding end turns, use of an asynchronous airflow source, and / or directing coolant through conduits extending through the stator into thermal contact with the windings.