G349.7+0.2 is a young Galactic supernova remnant (SNR) located at the distance of 11.5 kpc and observed across the entire electromagnetic spectrum from radio to high energy (HE; 0.1 GeV <E< 100 GeV) γ-rays. Radio and infrared observations indicate that the remnant is interacting with a molecular cloud. In this paper, the detection of very high energy (VHE, E> 100 GeV) γ-ray emission coincident with this SNR with the High Energy Stereoscopic System (H.E.S.S.) is reported. This makes it one of the farthest Galactic SNR ever detected in this domain. An integral flux F(E> 400 GeV) = (6.5 ± 1.1stat ± 1.3syst) × 10-13 ph cm-2 s-1 corresponding to ~0.7% of that of the Crab Nebula and to a luminosity of ~1034 erg s-1 above the same energy threshold, and a steep photon index ΓVHE = 2.8 ± 0.27stat ± 0.20syst are measured. The analysis of more than 5 yr of Fermi-LAT data towards this source shows a power-law like spectrum with a best-fit photon index ΓHE = 2.2 ± 0.04stat+0.13-0.31 sys. The combined γ-ray spectrum of G349.7+0.2 can be described by either a broken power-law (BPL) or a power-law with exponential (or sub-exponential) cutoff (PLC). In the former case, the photon break energy is found at Ebr,γ = 55+70-30 GeV, slightly higher than what is usually observed in the HE/VHE γ-ray emitting middle-aged SNRs known to be interacting with molecular clouds. In the latter case, the exponential (respectively sub-exponential) cutoff energy is measured at Ecut,γ = 1.4+1.6-0.55 (respectively 0.35+0.75-0.21) TeV. A pion-decay process resulting from the interaction of the accelerated protons and nuclei with the dense surrounding medium is clearly the preferred scenario to explain the γ-ray emission. The BPL with a spectral steepening of 0.5-1 and the PLC provide equally good fits to the data. The product of the average gas density and the total energy content of accelerated protons and nuclei amounts to nHWp ~ 5 × 1051 erg cm-3.