A search for narrow and broad resonances with masses greater than 1.8 TeV decaying to a pair of jets is presented. The search uses proton-proton collision data at s √
= 13 TeV collected at the LHC, corresponding to an integrated luminosity of 137 fb−1. The background arising from standard model processes is predicted with the fit method used in previous publications and with a new method. The dijet invariant mass spectrum is well described by both data-driven methods, and no significant evidence for the production of new particles is observed. Model independent upper limits are reported on the production cross sections of narrow resonances, and broad resonances with widths up to 55% of the resonance mass. Limits are presented on the masses of narrow resonances from various models: string resonances, scalar diquarks, axigluons, colorons, excited quarks, color-octet scalars, W′ and Z′ bosons, Randall-Sundrum gravitons, and dark matter mediators. The limits on narrow resonances are improved by 200 to 800 GeV relative to those reported in previous CMS dijet resonance searches. The limits on dark matter mediators are presented as a function of the resonance mass and width, and on the associated coupling strength as a function of the mediator mass. ... mehrThese limits exclude at 95% confidence level a dark matter mediator with a mass of 1.8 TeV and width 1% of its mass or higher, up to one with a mass of 4.8 TeV and a width 45% of its mass or higher.