A search for physics beyond the standard model is performed using a sample of high-mass diphoton events produced in proton-proton collisions at √s=13 TeV. The data sample was collected in 2016 with the CMS detector at the LHC and corresponds to an integrated luminosity of 35.9 fb−1. The search is performed for both resonant and nonresonant new physics signatures. At 95% confidence level, lower limits on the mass of the first Kaluza-Klein excitation of the graviton in the Randall-Sundrum warped extra-dimensional model are determined to be in the range of 2.3 to 4.6 TeV, for values of the associated coupling parameter between 0.01 and 0.2. Lower limits on the production of scalar resonances and model-independent cross section upper limits are also provided. For the large extra-dimensional model of Arkani-Hamed, Dimopoulos, and Dvali, lower limits are set on the string mass scale MS ranging from 5.6 to 9.7 TeV, depending on the model parameters. The first exclusion limits are set in the two-dimensional parameter space of a continuum clockwork model.