Using and refining a technique developed by O. Thorin, we prove: THEOREM. Let $f(x) = C\cdot x^{\beta - 1} h(x), x > 0$, be a probability density on $(0, \infty)$. Here $\beta > 0$ and $h$ is continuous and satisfies $h(0) = 1$. Assume that $h$ can be analytically continued to the whole complex plane cut along the negative real axis and assume that $h$ satisfies some other regularity assumptions. If $h$ is completely monotone on $(0, \infty)$ and if, for each fixed $u > 0$, the function $h(u\nu(t))h(u/\nu(t))$, where $\nu(t) = t + 1 + (t^2 + 2t)^{\frac{1}{2}}$, is completely monotone on $(0, \infty)$, then $f(x)$ is the density of a generalized gamma convolution and hence infinitely divisible. The theorem is applied to show the infinite divisibility of a rather large class of probability densities on $(0, \infty)$. In particular we show that a power with exponent of modulus $\geqslant 1$ of the ratio of two gamma distributed rv's has an infinitely divisible distribution.