  The megajansky radio burst, FRB 20200428, and other bright radio bursts
detected from the Galactic source SGR J1935+2154 suggest that magnetars can
make fast radio bursts (FRBs), but the emission site and mechanism of FRB-like
bursts are still unidentified. Here we report the emergence of a radio pulsar
phase of the magnetar five months after FRB 20200428. 795 pulses were detected
in 16.5 hours over 13 days by the Five-hundred-meter Aperture Spherical Radio
telescope, with luminosities about eight decades fainter than FRB 20200428. The
pulses were emitted in a narrow phase window anti-aligned with the X-ray
pulsation profile observed by the X-ray telescopes. The bursts, conversely,
appear in random phases. This dichotomy suggests that radio pulses originate
from a fixed region within the magnetosphere, but bursts occur in random
locations and are possibly associated with explosive events in a dynamically
evolving magnetosphere. This picture reconciles the lack of periodicity in
cosmological repeating FRBs within the magnetar engine model.
