A xenolith ("foreign rock") is a rock fragment (country rock) that becomes enveloped in a larger rock during the latter's development and solidification. In geology, the term xenolith is almost exclusively used to describe inclusions in igneous rock entrained during magma ascent, emplacement and eruption. Xenoliths may be engulfed along the margins of a magma chamber, torn loose from the walls of an erupting lava conduit or explosive diatreme or picked up along the base of a flowing body of lava on the Earth's surface. A xenocryst is an individual foreign crystal included within an igneous body. Examples of xenocrysts are quartz crystals in a silica-deficient lava and diamonds within kimberlite diatremes. Xenoliths can be non-uniform within individual locations, even in areas which are spatially limited, e.g. rhyolite-dominated lava of Niijima volcano (Japan) contains two types of gabbroic xenoliths which are of different origin - they were formed in different temperature and pressure conditions.
Although the term xenolith is most commonly associated with inclusions in igneous rocks, a broad definition could also include rock fragments which have become encased in sedimentary rock. Xenoliths have been found in some meteorites.