A search is presented for a narrow resonance decaying to a pair of oppositely charged muons using √s=13 TeV proton-proton collision data recorded at the LHC. In the 45–75 and 110–200 GeV resonance mass ranges, the search is based on conventional triggering and event reconstruction techniques. In the 11.5–45 GeV mass range, the search uses data collected with dimuon triggers with low transverse momentum thresholds, recorded at high rate by storing a reduced amount of trigger-level information. The data correspond to integrated luminosities of 137 and 96.6 fb−1 for conventional and high-rate triggering, respectively. No significant resonant peaks are observed in the probed mass ranges. The search sets the most stringent constraints to date on a dark photon in the ∼30–75 and 110–200 GeV mass ranges.