Observation of inverse Compton emission from a long γ-ray burst