Liquefaction occurs when saturated sandy soils lose strength and behave like liquid during an earthquake. The shaking causes water to rise through the soil, mixing with the grains and turning the soil into a weak custard-like substance. To prepare for liquefaction, structures should not be built on soft sandy soils. Buildings can be designed to withstand liquefaction through reinforced foundations and allowing movement during shaking. The soil structure can also be strengthened by injecting other materials.