We investigate commutative Bezout domains in which any nonzero prime ideal is contained in a finite set of maximal ideals. In particular, we have described the class of such rings, which are elementary divisor rings. A ring $R$ is called an elementary divisor ring if every matrix over $R$ has a canonical diagonal reduction (we say that a matrix $A$ over $R$ has a canonical diagonal reduction if for the matrix $A$ there exist invertible matrices $P$ and $Q$ of appropriate sizes and a diagonal matrix $D=\mathrm{diag}(\varepsilon_1,\varepsilon_2,\dots,\varepsilon_r,0,\dots,0)$ such that $PAQ=D$ and $R\varepsilon_i\subseteq R\varepsilon_{i+1}$ for every $1\le i\le r-1$). We proved that a commutative Bezout domain $R$ in which any nonze\-ro prime ideal is contained in a finite set of maximal ideals and for any nonzero element $a\in R$ the ideal $aR$ a decomposed into a product $aR = Q_1\ldots Q_n$, where $Q_i$ ($i=1,\ldots, n$) are pairwise comaximal ideals and $\mathrm{rad}\,Q_i\in\mathrm{spec}\, R$, is an elementary divisor ring.