In the Miller-Urey experiment, electrical sparks were used to simulate lightning strikes, which served the purpose of simulating the conditions on early Earth. These electrical discharges were passed through a mixture of gases thought to be present in the primitive Earth's atmosphere, such as methane (CH4), ammonia (NH3), hydrogen (H2), and water vapor (H2O). The energy from the electrical sparks provided the necessary catalyst to initiate chemical reactions among these gases, ultimately leading to the formation of organic molecules, including amino acids. This experiment was a significant milestone in understanding how the basic building blocks of life could have arisen under prebiotic conditions.