  The most versatile version of the classical divergence Borel-Cantelli lemma
shows that for any divergent sequence of events $E_n$ in a probability space
satisfying a quasi-independence condition, its corresponding limsup set
$E_\infty$ has positive probability. In particular, it provides a lower bound
on the probability of $E_\infty$. In this paper we establish a new version of
this classical result which guarantees, under an additional mild assumption,
that the probability of $E_\infty$ is not just positive but is one. Unlike
existing optimal results, it is applicable within the setting of arbitrary
probability spaces. We then go onto to consider a range of applications in
number theory and dynamical systems. These include new results on the
inhomogeneous Duffin-Schaeffer conjecture. In particular, we establish
alternatives to the classical (homogeneous) zero-one laws of Cassels and
Gallagher and use them to resolve the so-called weak Duffin-Schaeffer
conjecture for an arbitrary rational inhomogeneous shift. As a bi-product, we
establish the Duffin-Schaeffer conjecture with congruence relations. The
applications to dynamical systems include new characterisations of
Borel-Cantelli sequences and new dynamical Borel-Cantelli lemmas, as well as
characterising Khintchine-type sequences for shrinking targets.
