The ratio of branching fractions R(D∗−)≡B(B0→D∗−τ+ντ)/B(B0→D∗−μ+νμ) is measured using a data sample of proton-proton collisions collected with the LHCb detector at center-of-mass energies of 7 and 8 Tev, corresponding to an integrated luminosity of 3fb−1. For the first time R(D∗−) is determined using the τ lepton decays with three charged pions in the final state. The B0→D∗−τ+ντ yield is normalized to that of the B0→D∗−π+π−π+ mode, providing a measurement of B(B0→D∗−τ+ντ)/B(B0→D∗−π+π−π+)=1.97±0.13±0.18, where the first uncertainty is statistical and the second systematic. The value of B(B0→D∗−τ+ντ)=(1.42±0.094±0.129±0.054)% is obtained, where the third uncertainty is due to the limited knowledge of the branching fraction of the normalization mode. Using the well-measured branching fraction of the B0→D∗−μ+νμ decay, a value of R(D∗−)=0.291±0.019±0.026±0.013 is established, where the third uncertainty is due to the limited knowledge of the branching fractions of the normalization and B0→D∗−μ+νμ modes. This measurement is in agreement with the Standard Model prediction and with previous results.