Measurement of homogenization temperatures for 274 aqueous and 366 hydrocarbon fluid inclusions trapped within quartz overgrowths in Jurassic sandstones from the Norwegian continental shelf indicates that quartz cementation of the studied sandstones has taken place at temperatures between 75 degrees C and 165 degrees C. Inclusions trapped at temperatures below 100 degrees C are common in samples that have spent several tens of millions of years within the temperature interval 75-100 degrees C, whereas sandstones that have passed more rapidly through this range of temperatures seldom contain inclusions trapped below 100 degrees C, probably due to inclusions not having had time to form in the sandstones that were heated most rapidly. Different heating rates after sandstones enter the temperature range where quartz cementation takes place may also give rise to a correlation between homogenization temperatures and present formation temperatures, since inclusions of a given size that start to form simultaneously in different sandstones become closed at the highest temperatures in the sandstones that are heated most rapidly. Such a correlation may be misinterpreted as indicating stretching of inclusions and resetting of homogenization temperatures. Quartz cementation at temperatures above 75 degrees C is compatible with dissolution of quartz clasts at stylolites and grain contacts and/or quartz produced by clay-mineral reactions in shales being the dominant sources of quartz cement. However, lack of a viable mechanism for transport of large amounts of quartz from shales and into sandstones, combined with the common occurrence of stylolites in the studied cores, suggests that dissolution of quartz at stylolites, and to a lesser extent at grain contacts, were the most important sources of quartz cement. Homogenization temperatures approximately equal to or slightly below present formation temperature are common in the studied sandstones despite the presence of hydrocarbons. This suggests that quartz cementation is still in progress, which in turn implies that hydrocarbon emplacement has not stopped quartz cementation. Probable continued quartz cementation after hydrocarbon emplacement can be explained by dissolution of quartz at stylolites and grain contacts and subsequent short-range diffusion to sites of precipitation through water films coating grains.