ABSTRACTContinental carbonates of the basal part of the Guarga Formation, Upper Eocene, have been studied in the field and in the laboratory. Both geographic pattern and vertical sequences served as a basis for sedimentary models. The pattern reveals that carbonate deposition was greater in the western part of the Tremp‐Graus Basin than in the eastern part. Studies of slabs and thin sections suggest high energy deposition in the eastern part of the basin and low energy deposition in the western part. Gross lithology, petrography, and faunal/floral associations indicate sedimentary environments which include calcimorphic palaeosoils, caliche nodule zones, solid caliche nodule zones, caliche crusts, fluvial carbonates, paludal carbonates, and pond/lake carbonates. Distribution pattern of the carbonate bodies and lithologies seem to be controlled by alluvial‐fan processes. They are typical fining‐upward sequences in the sense of Collinson (1978) which furthermore can be assigned to a channel‐bound group and a succession independent of fluvial channels. Referring to fan‐physiography the sequences can be subdivided into fluvial proximal interchannel, fluvial distal interchannel, lacustrine distal interchannel, nearshore lacustrine‐paludine, and lacustrine offshore carbonate facies. The two last categories are distal alluvial plain and/or fan‐edge associations. The presence of especially charophyte oogonia adjacent to pseudomorphs of lenticular gypsum in the lacustrine carbonates of the western Tremp‐Graus Basin indicates that their depositional environment was that of shallow lakes with alternating salinities.Diagenetic alterations consist of three major phenomena: (a) general cementation of the carbonates by low‐Mg calcite, (b) pseudomorphs of lenticular gypsum, and (c) silification. The relationship of gypsum and silica diagenesis to the regional distribution of lacustrine carbonates suggests early diagenetic processes for their formation. Gypsum pseudomorphs are small and are found to be replaced by Fe‐calcite throughout the whole area, or are large and replaced preferentially by silica in the west only. There is experimental evidence (Cody, 1979) that distribution of gypsum morphology and crystal sizes can be related to increased salinities and increased organic production in the west.Chert‐gypsum fabrics from that area resemble the ‘silex nectique’ of Cayeux (1929). The occurrence of this noteworthy type of chert together with length‐slow chalcedony is an indication of relatively early silification of the gypsum. It is suggested that the sediments containing the silicified lenticular gypsum hosted brines of partly marine origin which alternately became brackish or fresh.An attempt was made to check the influence of evaporation during carbonate deposition by determining the stable isotope composition of the carbonates and of the chert. The data show no distinct variations with respect to the presumed palaeoenvironments. The ranges in the carbonates (δ13C − 5,0 to −7,9; δ18 O −4,5 to −7,7) fit among the data given in the literature. The values derived from chert (δ18O 26,9 to 31 SMOW) support a concept of alternating salinities.Distribution of carbonate lithofacies indicate a systematic change in sedimentation from fluvial/ephemeral to permanent lacustrine from east to west. Diagenetic alterations suggest an increase of salinities of pore waters in the same direction. In addition the lacustrine limestones in the west were due to frequent changes in pore‐water salinity. Similar sequences lacking subtidal and/or lagoonal fossil associations but including pseudomorphs of carbonate and chert after lenticular gypsum were described from the Lower Purbeckian of Dorset (West, 1964, 1975, 1979), and from the Tertiary of the Paris Basin (Fontes, 1968). Guarga limestone environments of especially the western Tremp‐Graus Basin probably resembled the modern semi‐arid ephemeral saline lakes in Australia (Burne, Bauld & De Dekker, 1980). Gypsum precipitation in these environments can be compared to the one in modern sabkhas from the Mediterranean coast of Egypt (West, Ali & Hilmy, 1979; Ali West & Hilmy, 1980).