Zina is prohibited according to

Q 1: What is the Had (ordained punishment for violating Allah’s Law) prescribed for Zina (sexual intercourse outside marriage)? How should a Muslim avoid Zina?

A: The Had prescribed for a person who commits Zina is that they should receive one hundred lashes (Part No. 22; Page No. 35) and be sent into exile for one year, if they are bachelors. In case they are married, they are to be stoned to death. This Had applies when the person is proved to have committed Zina either by their confession or by the testimony of four just witnesses. The ruler of the country or his deputy is the only one entitled to inflict the Had. A person may avoid Zina by avoiding its causes, such as temptations, licentious stories, and other things that arouse one's sexual desires. Applying the Had prescribed in the Shari`ah (Islamic law) helps to prevent Zina. Moreover, a Muslim must avoid Khulwah (being alone with a member of the opposite sex) with a non-Mahram (not a spouse or an unmarriageable relative), looking at her with lust, and other means of temptations.May Allah grant us success. May peace and blessings be upon our Prophet Muhammad, his family, and Companions.