  To exploit the full potential of Kepler light curves, sophisticated and
robust analysis tools are now required more than ever. Characterizing single
stars with an unprecedented level of accuracy and subsequently analyzing
stellar populations in detail are fundamental to further constrain stellar
structure and evolutionary models. We developed a new code, termed Diamonds,
for Bayesian parameter estimation and model comparison by means of the nested
sampling Monte Carlo (NSMC) algorithm, an efficient and powerful method very
suitable for high-dimensional and multi-modal problems. A detailed description
of the features implemented in the code is given with a focus on the novelties
and differences with respect to other existing methods based on NSMC. Diamonds
is then tested on the bright F8 V star KIC~9139163, a challenging target for
peak-bagging analysis due to its large number of oscillation peaks observed,
which are coupled to the blending that occurs between $\ell=2,0$ peaks, and the
strong stellar background signal. We further strain the performance of the
approach by adopting a 1147.5 days-long Kepler light curve. The Diamonds code
is able to provide robust results for the peak-bagging analysis of KIC~9139163.
We test the detection of different astrophysical backgrounds in the star and
provide a criterion based on the Bayesian evidence for assessing the peak
significance of the detected oscillations in detail. We present results for 59
individual oscillation frequencies, amplitudes and linewidths and provide a
detailed comparison to the existing values in the literature. Lastly, we
successfully demonstrate an innovative approach to peak bagging that exploits
the capability of Diamonds to sample multi-modal distributions, which is of
great potential for possible future automatization of the analysis technique.
