Abstract : The γ-ray spectra ol the strongest solar flares often show a broad and complex structure in the 0.1-10 MeV region sitting on a bremsstrahlung continuum. This structure is composed of several outstanding narrow lines and of thousands of unresolved narrow and broad lines forming a quasi-continuum. The major part of this emission is due to prompt deexcitation lines following nuclear interactions of accelerated light and heavy ions with the atomic nuclei composing the solar atmosphere. A similar emission is expected from interactions of galactic cosmic rays with the interstellar gas and dust. Experimental nuclear reaction studies coupled with extensive calculations have been done in the last one and a half decade at Orsay for the modelisation of this γ-ray emission. After a description of the nuclear reaction studies the analysis of one solar flare spectrum and predictions for the emission from the inner Galaxy will be presented.