illustrated by fluctuations in the imep of the cylinders accordingly a system and method are presented for controlling fuel injection timing and spark timing during transitions between combustion modes of an hcci engine specifically the system and method may control fuel injection timing and spark timing to prevent combustion problems during transitions from hcci combustion to mixed mode combustion the system and method may per combustion event advance timing of n fuel injections retard timing of m fuel injections and retard spark timing the n and m fuel injections may occur sequentially with the n fuel injections preceding the m fuel injections for example n may be two and m may be one e g a total of three fuel injections in each cylinder during each combustion cycle more specifically the system and method may per combustion event advance the timing of the n fuel injections retard the timing of the m fuel injections and retard the spark timing to predetermined timings respectively the system and method may then retard the timing of the n fuel injections advance the timing of the m fuel injections and advance the spark timing to desired timings during a predetermined period advancing the timing of the n fuel injections may increase fuel reforming during mixed mode combustion additionally retarding the timing of the m fuel injections and the spark timing may provide for more robust stratified combustion during the transition from hcci combustion to mixed mode combustion referring now to fig2 an engine system 10 includes an hcci engine 12 the hcci engine 12 draws air into an intake manifold 14 through an inlet system 16 that may be regulated by a throttle 22 for example the throttle 22 may be electronically controlled e g electronic.