The invention relates to a process for preparing (meth)acrylic esters by esterifying (meth)acrylic acid or transesterifying at least one (meth)acrylic ester with at least one compound comprising at least one OH group in the presence of a heterogeneous catalyst comprising at least one inorganic salt, wherein the esterification or transesterification is performed in the presence of 300 to 3000 ppm of water based on the total weight of the reaction mixture.