  The prompt optical emission that arrives with gamma-rays from a cosmic
gamma-ray burst (GRB) is a signature of the engine powering the burst, the
properties of the ultra-relativistic ejecta of the explosion, and the ejecta's
interactions with the surroundings. Until now, only GRB 990123 had been
detected at optical wavelengths during the burst phase. Its prompt optical
emission was variable and uncorrelated with the prompt gamma-ray emission,
suggesting that the optical emission was generated by a reverse shock arising
from the ejecta's collision with the surrounding material. Here we report
prompt optical emission from GRB 041219a. It is variable and correlated with
the prompt gamma-rays, indicating a common origin for the optical light and the
gamma-rays. Within the context of the standard fireball model of GRBs, we
attribute this new optical component to internal shocks driven into the burst
ejecta by variations of the inner engine. The correlated optical emission is a
direct probe of the jet isolated from the medium. The timing of the
uncorrelated optical emission is strongly dependent on the nature of the
medium.
