We study the existence of positive solutions for second-order nonlinear differential equations with nonseparated boundary conditions. Our nonlinearity may be singular in its dependent variable. The proof of the main result relies on a nonlinear alternative principle of Leray-Schauder. Recent results in the literature are generalized and significantly improved.