Effective-one-body (EOB) waveforms employed by the LIGO-Virgo-KAGRA Collaboration have primarily been developed by resumming the post-Newtonian expansion of the relativistic two-body problem. Given the recent significant advancements in post-Minkowskian (PM) theory and gravitational self-force formalism, there is considerable interest in creating waveform models that integrate information from various perturbative methods in innovative ways. This becomes particularly crucial when tackling the accuracy challenge posed by upcoming ground-based detectors (such as the Einstein Telescope and Cosmic Explorer) and space-based detectors (such as LISA, TianQin, or Taiji) expected to operate in the next decade. In this context, we present the derivation of the first spinning EOB (SEOB) Hamiltonian that incorporates PM results up to three-loop order: the SEOB-PM model. The model accounts for the complete hyperbolic motion, encompassing nonlocal-in-time tails. To evaluate its accuracy, we compare its predictions for the conservative scattering angle, augmented with dissipative contributions, against numerical-relativity data of nonspinning and spinning equal-mass black holes. We observe very good agreement, comparable, and in some cases slightly better to the recently proposed wEOB-potential model, of which the SEOB-PM model is a resummation around the probe limit. Indeed, in the probe limit, the SEOB-PM Hamiltonian and scattering angles reduce to the one of a test mass in Kerr spacetime. Once complemented with nonlocal-in-time contributions for bound orbits, the SEOB-PM Hamiltonian can be utilized to generate waveform models for spinning black holes on quasicircular orbits. Published by the American Physical Society 2024