  It is proposed that the prompt emission observed in bursts that exhibit a
thermal component originates from relativistic radiation mediated shocks that
form below the photosphere of the GRB outflow. It is argue that such shocks are
expected to form in luminous bursts via collisions of shells that propagate
with moderate Lorentz factors $\Gamma\lesssim 500$. Faster shells will collide
above the photosphere to form collisionless shocks. We demonstrate that in
events like GRB 090902B a substantial fraction of the explosion energy is
dissipated below the photosphere, in a region of moderate optical depth
$\tau\lesssim300$, whereas in GRB 080916C the major fraction of the energy
dissipates above the photosphere. We show that under conditions anticipated in
many GRBs, such relativistic radiation mediated shocks convect enough radiation
upstream to render photon production in the shock transition negligible, unlike
the case of shock breakout in supernovae. The resulting spectrum, as measured
in the shock frame, has a relatively low thermal peak, followed by a broad,
nonthermal component extending up to the KN limit.
