A Monte Carlo technique for modeling background in space-based gamma-ray telescopes has been developed. The major background components included in this modeling technique are the diffuse cosmic gamma-ray flux, the Earth's atmospheric flux, the decay of nuclei produced by spallation of cosmic rays, trapped protons and their secondaries, the decay of nuclei produced by neutron capture, and the d...