One-pot three-component condensation of ethyl acetoacetate, aldehyde and urea or thiourea in refluxing ethanol in the presence of catalytic amounts of citric acid afforded the corresponding 3,4-dihydropyrimidin-2(1H)-ones/thiones in high yields. The catalyst is reusable and can be applied several times without any decrease in product yield.