Fast radio bursts ( FRBs ) are millisecond-duration , extragalactic radio flashes of unknown physical origin [ 1 , 2 , 3 ] . FRB 121102 , the only known repeating FRB source [ 4 , 5 , 6 ] , has been localized to a star-forming region in a dwarf galaxy [ 7 , 8 , 9 ] at redshift z = 0.193 , and is spatially coincident with a compact , persistent radio source [ 7 , 10 ] . The origin of the bursts , the nature of the persistent source , and the properties of the local environment are still debated . Here we present bursts that show \sim 100 % linearly polarized emission at a very high and variable Faraday rotation measure in the source frame : \text { RM$ { } _ { src } $ } = +1.46 \times 10 ^ { 5 } rad m ^ { -2 } and +1.33 \times 10 ^ { 5 } rad m ^ { -2 } at epochs separated by 7 months , in addition to narrow ( \lesssim 30 \mu s ) temporal structure . The large and variable rotation measure demonstrates that FRB 121102 is in an extreme and dynamic magneto-ionic environment , while the short burst durations argue for a neutron star origin . Such large rotation measures have , until now , only been observed [ 11 , 12 ] in the vicinities of massive black holes ( M _ { BH } \gtrsim 10 ^ { 4 } M _ { \odot } ) . Indeed , the properties of the persistent radio source are compatible with those of a low-luminosity , accreting massive black hole [ 10 ] . The bursts may thus come from a neutron star in such an environment . However , the observed properties may also be explainable in other models , such as a highly magnetized wind nebula [ 13 ] or supernova remnant [ 14 ] surrounding a young neutron star .