A Markov model of semiconductor nanolaser is constructed in order to describe finely the effects of quantum fluctuations in the dynamics of the laser, in particular by considering the transition to lasing. Nanolasers are expected to contain only a small number of emitters, whose semiconductor bands are simulated using true carrier energy states. The model takes into account carrier-carrier interactions in the conduction and valence bands, but the result is a huge Markov chain that is often too demanding for direct Monte-Carlo simulation. We introduce here a technique to split the whole chain into two subchains, one referring to thermalization events within the bands and the other to laser photonic events of interest. The model is applied to the analysis of laser transition and enlightens the coexistence of a pulse regime triggered by the quantum nature of the photon with the birth of the known coherent cw regime. This conclusion is highlighted by calculated time traces. We show that on the ultrasmall scale of nanolasers, we are unable to define perfectly the threshold.