An electrical machine comprises a stator and a housing. The housing has an internal bore. The stator comprises an annular core mounted within the bore of the housing. The core comprises at least one key projecting radially outwardly from a radially outer surface thereof. The housing comprises at least one keyway in the bore. The at least one key of the core being received within the at least one keyway of the housing.