The present invention relates to a method for generating nitric oxide, which comprises the steps of: providing a precursor solution comprising a nitric oxide precursor in a first reservoir (12), guiding the precursor solution through a reaction chamber (16), thereby subjecting the precursor solution to radiation to generate nitric oxide, guiding the generated nitric oxide out of the reaction chamber (16) by a stream of carrier gas, and guiding the reacted solution into a second reservoir (14). The method according to the invention provides a method of generating nitric oxide, or a flow of nitric oxide comprising gas, in which the concentration of the nitric oxide may be kept especially constant. Also claimed is an apparatus for generating nitric oxide comprising reservoirs for the precursor solution and the reacted solution and a reaction chamber.