Abstract The effect of water sorption of composite and thermal stress on the marginal adaptation to the dentin cavity wall was evaluated by measurement of the gap width between composite fillings and the dentin cavity wall. The wall of a cylindrical dentin cavity prepared in the proximal surface of extracted human molars was cleaned with neutralized 0.5 M EDTA and pre-treated with one of three experimental dentin primers [35% hydroxyethyl methacrylate (HEMA), 35% HEMA containing 5% glutaraldehyde, and 35% glyceryl methacrylate]. A light-activated composite (Silux, 3M Co., St. Paul, MN) was used to fill the cavity after application of a bonding agent (Clearfil New Bond, Kuraray Co., Osaka, Japan). The marginal gap width was measured after the specimens were immersed in water and thermal-cycled. The initial contraction gap of the tested bonding systems was closed completely by the water sorption of the composite for six hours, and such a marginal adaptation was not interrupted by 60 thermal cycles between 10 and 45°C. Among the dentin primers tested, only the 35% aqueous solution of glyceryl methacrylate mediated gap-free fillings in all specimens.