The invention relates to the field of nitric oxide generation. The present invention particularly relates to a method for generating a stream of gas, the gas comprising oxygen and nitric oxide. According to the invention, an intermittent stream of oxygen comprising gas having at least one gap is provided, in which gap a defined pulse of nitric oxide comprising gas is provided. The pulse of nitric oxide comprising gas is embedded in a first pulse of inert gas being provided before the pulse of nitric oxide comprising gas and a second pulse of inert gas being provided after the pulse of nitric oxide comprising gas, the first pulse of inert gas and the second pulse of inert gas being provided in the gap of the intermittent stream of oxygen comprising gas. The method according to the invention reduces the danger of toxic compounds to be formed in the generated gas stream and furthermore provides a method being usable for therapeutic applications independent from the breathing cycle of a patient.