The effective elastic moduli of a fluid-saturated solid containing thin cracks depend on the degree of interconnection between the cracks. Three separate regimes may be identified: (1) dry (drained), in which fluid in cracks can flow out of bulk regions of compression, (2) saturated isobaric, in which fluid may flow from one crack to another but no bulk flow takes place, and (3) saturated isolated, in which there is no communication of fluid between cracks. Transitions between these cases involve fluid flow, resulting in dissipation of energy. Relaxation of shear stresses in viscous fluid inclusions also results in dissipation. Viscoelastic moduli are derived, by using a self-consistent approximation, that describe the complete range of behavior. There are two characteristic frequencies near which dissipation is largest and the moduli change rapidly with frequency. The first corresponds to fluid flow between cracks, and its value can be estimated from the crack geometry or permeability. The second corresponds to the relaxation of shear stress in an isolated viscous fluid inclusion; its value may also be estimated. Variations of crack geometry result in a distribution of characteristic frequencies and cause Q to be relatively constant over many decades of frequency. Fluid flow between cracks accounts for attenuation of seismic waves in water-saturated rocks and attenuation observed in laboratory measurements on water-saturated rocks and partially molten aggregates. Attenuation in a partially molten upper mantle is probably due to fluid flow between cracks, although grain boundary relaxation in an unmelted upper mantle could also account for the seismic low-velocity zone. Grain boundary relaxation in the mantle may cause the long-term shear modulus to be around 20% less than that measured from seismic observations.