||We prove the following result: Theorem. Every algebraic distributive lattice D with at most N1 compact elements is isomorphic to the ideal lattice of a von Neumann regular ring R. (By earlier results of the author, the N1 bound is optimal. ) Therefore, D is also isomorphic to the congruence lattice of a sectionally complemented modular lattice L, namely, the principal right ideal lattice of R. Furthermore, if the largest element of D is compact, then one can assume that R is unital, respectively, that L has a largest element. This extends several known results of G. M. Bergman, A. P. Huhn, J. Tuma, and of a joint work of G. Grätzer, H. Lakser, and the author, and it solves Problem 2 of the survey paper . The main tool used in the proof of our result is an amalgamation theorem for semilattices and algebras (over a given division ring), a variant of previously known amalgamation theorems for semilattices and lattices, due to J. Tuma, and G. Grätzer, H. Lakser, and the author.