If two of you indulged in it are brought, then you deal harshly with both of them, if they both repent and reform, you leave them; indeed Allah is Relenting, the Merciful.
These verses are revealed in Medina after the Battle of Uhud to reduce sexual offenses in society. In Islam, every period the evils are annihilated stage by stage. The first stage of punishment for fornication/ prostitution is mentioned here. The second stage is revealed in 24: 2 which says that both the woman and man engaged in fornication should be flogged a hundred stripes, and a party of believers should witness the punishment. "Lord Allah directs a way about them", told in verse 4: 15 is about revealing verse 24: 2. The third and final stage "To kill them by pelting stone if both of them are married" was put into practice by Messenger Muhammad. That was the law in Torah also, and Messenger Jesus had put it into practice. The word of Jesus: "Those who are free of sin may pelt stone on such fornicated" indicates that the punishment in Torah for fornication after marriage was also to kill them by pelting stone. But no one was there in that society of Jesus without doing sin to implement it.
Today any stage of punishment for prostitution or fornication can't be implemented in society since there is no group of believers anywhere in the world. The only way to reduce sexual offenses such as sodomy, fornication, and rape is to advise them to holdfast Adhikr which is the Food, Cloth, and Sight of the human soul. And also make them aware of the Recording Book fastened upon everyone’s neck as explained in verses 17: 13-14. That is the only way to abstain from all Satanic footsteps as explained in verses 2: 168-169. Sodomy which is an anti-natural activity is a severe offense and evil than fornication. So, Lord has taught through His Messenger to kill both those who are engaged in it. But among mankind, the Arabic Quran reading Fujjar who read these verses are engaged more in sodomy and prostitution than any other people. And also they are involved more in sodomy than prostitution without considering it as evil.
On the Day of Judgment, the hypocrites among Fujjar who are hiding Adhikr from mankind should bear the burden of all evils happening all over the world and will enter Hell as told in verses 6: 26; 20: 99-100; 33: 72-73; 48: 6 and 98: 6. Being deaf and dumb towards Adhikr, Fujjar are denoted as the worst creatures in verse 8: 22. See explanation 2: 219-220; 3: 110 and 4: 1.