X-ray binaries are composed of a normal star in orbit around a neutron star or stellar-mass black hole. Radio and x-ray observations have led to the presumption that some x-ray binaries called microquasars behave as scaled-down active galactic nuclei. Microquasars have resolved radio emission that is thought to arise from a relativistic outflow akin to active galactic nuclei jets, in which particles can be accelerated to large energies. Very high energy γ-rays produced by the interactions of these particles have been observed from several active galactic nuclei. Using the High Energy Stereoscopic System, we find evidence for gamma-ray emission of >100 gigaelectron volts from a candidate microquasar, LS 5039, showing that particles are also accelerated to very high energies in these systems.