Still, the temperature in continental crust is usually not high enough to cause melting, and thus another heat source is necessary. In most cases it appears that this heat source is basaltic magma. The basaltic magma is generated in the mantle, then rises into the continental crust. But, because basaltic magma has a high density it may stop in the crust and crystallize, releasing heat into the surrounding crust. This raises the geothermal gradient and may cause wet partial melting of the crust to produce rhyolitic magmas.