  We consider groupoids in the category of principal bundles, which we call
principal bundles (PB) groupoids. Inspired by work by Th. Nikolaus and K.
Waldorf, we generalise bundle gerbes over manifolds to bundle gerbes over
groupoids and discuss a functorial correspondence between PB groupoids and
bundle gerbes over groupoids. From a PB groupoid over a fibre product groupoid,
we build a bundle gerbe over another fibre product groupoid. Conversely, from a
bundle gerbe over a Lie groupoid, we build a PB groupoid. It has a trivial base
and from any PB groupoid with trivial base, we build a bundle gerbe over a Lie
groupoid. In that case, the resulting bundle gerbe is isomorphic as a groupoid
to a partial quotient of the PB groupoid. We describe the nerves of PB
groupoids and their partial quotients, which are simplicial objects in the
category of principal bundles. Applying this construction enables us to define
the inner transformation group of the nerve of a partial quotient groupoid and
to describe the transformations of the corresponding bundle gerbe.
