Short Title: Cosmic-ray electrons and diffuse gamma-ray spectrum PACS Numbers: 98.70.Sa Cosmic-rays (including sources, origin, acceleration, and interactions) 95.85.Pw Gamma-ray 98.70.Vc Background radiations AbstractThe bulk of the diffuse galactic gamma-ray emission above a few tens of GeV has been conventionally ascribed to the decay of neutral pions produced in cosmic-ray interactions with interstellar matter. Cosmic-ray electrons may, however, make a significant contribution to the gamma-ray spectrum at high energies, and even dominate at TeV-PeV energies depending on their injection spectral index and acceleration cut-off energy. If the injection spectrum is flat, the highest energy electrons will also contribute a diffuse hard X-ray/soft gamma-ray flux via synchrotron emission, and this may offer an explanation for the OSSE observation of a steep spectrum below a few MeV from the inner Galaxy. We perform a propagation calculation for cosmic-ray electrons, and use the resulting interstellar electron spectrum to obtain the gamma-ray spectrum due to inverse Compton, synchrotron and bremsstrahlung interactions consistently from MeV to PeV energies. We compare our results with available observations from satellite-borne telescopes, opticaľ Cerenkov telescopes and air shower arrays and place constraints on the injection spectrum of cosmic-ray electrons. With future observations at TeV-PeV energies it should be possible to determine the average interstellar spectrum of cosmic-ray electrons, and hence estimate their spectrum on acceleration.