The maximum power occurs under conditions when the largest amount of fuel can be most rapidly consumed at the proper crank angle. Generally, this occurs nearer stoichiometric conditions and at higher temperatures and often rpms than most engines are able to sustain for long. Therefore, the functional maximum occurs at high fuel flow rates (throttle nearly wide open) and at high rpms, at least up to the point that the governor or other rpm manager limits the conditions to avoid engine damage.
Do not confuse maximum power with maximum efficiency. The latter occurs at low fuel flows and relatively low rpms.
Yes, what Larry L. BAaxter said is correct, though the mixture is rich but if the combustion is not occurring near TDC the conversion of fuel energy to power will not occur. So right quantity of fuel air ratio with right time of combustion initiation leads to the generation of higher power. In case of SI engines the the mixture is lean but the combustion is in our control (to some extent ) by operating the spark plug. but in case of compression ignition engine it is not the case.
Many factors affect the power output in case of SI and CI engines. One need to be study the both the cases individually as the combustion mechanism is different in both the engines.