KREEP, an acronym built from the letters K (the atomic symbol for potassium), REE (Rare Earth Elements) and P (for phosphorus), is a geochemical component of some lunar impact breccia and basaltic rocks. Its most significant feature is somewhat enhanced concentration of a majority of so-called "incompatible" elements (those that are concentrated in the liquid phase during magma crystallization) and the heat-producing elements, namely radioactive uranium, thorium, and potassium (due to presence of the radioactive 40K).
The typical composition of KREEP includes about one percent, by mass, of potassium and phosphorus oxides, 20 to 25 parts per million of rubidium, and a concentration of the element lanthanum that is 300 to 350 times the concentrations found in carbonaceous chondrites.
Indirectly, it has been deduced that the origin of KREEP is contained in the origin of the Moon. This is now commonly thought to be the result of a rocky object the size of Mars that struck the Earth about 4.5 billion (4.5×109) years ago. This collision threw a large amount of broken rock into orbit around the Earth. This ultimately gathered together to form the Moon.
Given the high energy such a collision would involve, it has been deduced that a large portion of the Moon would have been liquified, and this formed a lunar magma ocean. As the crystallization of this liquid rock proceeded, minerals such as olivine and pyroxene precipitated and sank to the bottom to form the lunar mantle.