The analysis of earthquake focal mechanisms provides information about the stress regime, fault geometry, and deformation processes acting in a given region. Generally, the techniques aimed at determining focal mechanism are designed to work in a specific magnitude range operating both in the time and frequency domain and using different data (e.g., P polarities, S‐wave polarization, S/P‐amplitude ratios, etc.). In this article, we present a new method, Bayesian inversion of spectral‐level ratios and P‐wave polarities (BISTROP), that can be applied to both small and moderate‐to‐large magnitude events. BISTROP uses a Bayesian approach to jointly invert the long‐period spectral‐level P/S ratios and the P polarities to infer the fault‐plane solutions. We apply this method to analyze synthetic data as well as those generated by real earthquakes. We find that the obtained solutions for moderate earthquakes are comparable with those obtained using moment tensor inversion, and they are more constrained with respect to the solutions obtained using only P‐polarity data for small earthquakes.