Context. Flat-spectrum radio-quasars (FSRQs) are rarely detected at very high energies (E& x2004;>=& x2004;100 GeV) due to their low-frequency-peaked spectral energy distributions. At present, only six FSRQs are known to emit very high-energy (VHE) photons, representing only 7% of the VHE extragalactic catalog, which is largely dominated by high-frequency-peaked BL Lacertae objects. Aims. Following the detection of MeV-GeV gamma-ray flaring activity from the FSRQ PKS 0736+017 (z& x2004;=& x2004;0.189) with Fermi-LAT, the H.E.S.S. array of Cherenkov telescopes triggered target-of-opportunity (ToO) observations on February 18, 2015, with the goal of studying the gamma-ray emission in the VHE band. Methods. H.E.S.S. ToO observations were carried out during the nights of February 18, 19, 21, and 24, 2015. Together with Fermi-LAT, the multi-wavelength coverage of the flare includes Swift observations in soft X-ray and optical-UV bands, and optical monitoring (photometry and spectro-polarimetry) by the Steward Observatory, and the ATOM, the KAIT, and the ASAS-SN telescopes. Results. VHE emission from PKS 0736+017 was detected with H.E.S.S. only during the night of February 19, 2015. Fermi-LAT data indicate the presence of a gamma-ray flare, peaking at the time of the H.E.S.S. detection, with a flux doubling timescale of around six hours. The gamma-ray flare was accompanied by at least a 1 mag brightening of the non-thermal optical continuum. No simultaneous observations at longer wavelengths are available for the night of the H.E.S.S. detection. The gamma-ray observations with H.E.S.S. and Fermi-LAT are used to put constraints on the location of the gamma-ray emitting region during the flare: it is constrained to be just outside the radius of the broad-line region r(BLR) with a bulk Lorentz factor Gamma& x2004;similar or equal to& x2004;20, or at the level of the radius of the dusty torus r(torus) with Gamma& x2004;similar or equal to& x2004;60. Conclusions. PKS 0736+017 is the seventh FSRQ known to emit VHE photons, and at z& x2004;=& x2004;0.189 is the nearest so far. The location of the gamma-ray emitting region during the flare can be tightly constrained thanks to opacity, variability, and collimation arguments.