Garlic repels mosquitoes and prevents them from mating or laying eggs. The compound diallyl disulfide is responsible for these effects. This provides a scientific basis for a belief held for centuries.
Garlic has been considered a natural mosquito repellent for centuries. Its pungent smell is believed to drive away the insects that transmit diseases such as dengue fever and malaria.