The Prophet Lot (Lut) was sent by Allah to warn the people of Sodom and Gomorrah, who engaged in immoral acts and deviant behaviors. They ignored Lot's warnings and persisted in their sins, including homosexuality, corruption, and violence. Despite all his efforts to guide them to righteousness, the people refused to repent. As a result, Allah destroyed the cities of Sodom and Gomorrah, sparing only Lot and his family, except for his wife, who turned her back on the truth and was transformed into a pillar of salt.