These are the limits Allah (or ordainments as regards laws of inheritance), and whosoever obeys Allah and His Messenger (Muhammad S.A.W.S.) will be admitted to Gardens under which rivers flow (in Paradise), to abide therein, and that will be the ultimate triumph, And whosoever disobeys Allah and His Messenger (Muhammad S.A.W.S.), and exceeds their limits will be cast into the Fire, to abide therein; and shall suffer from a disgraceful and humiliating torment.
And those of your women who commit illegal sexual intercourse, take the evidence of four witnesses from amongst you against them; and if they testify, confine them (i.e. women) to houses until death comes to them or Allah ordains for them in a different way, And the two among you who commit this sin—discipline them. If they repent and mend their ways, relieve them. Surely Allah is ever Accepting of Repentance, Most Merciful.
Surah al-Nisa, 4:13 - 4:16
Book of the Noble Quran
تِلْكَ حُدُودُ ٱللَّهِ ۚ وَمَن يُطِعِ ٱللَّهَ وَرَسُولَهُۥ يُدْخِلْهُ جَنَّـٰتٍۢ تَجْرِى مِن تَحْتِهَا ٱلْأَنْهَـٰرُ خَـٰلِدِينَ فِيهَا ۚ وَذَٰلِكَ ٱلْفَوْزُ ٱلْعَظِيمُ
وَمَن يَعْصِ ٱللَّهَ وَرَسُولَهُۥ وَيَتَعَدَّ حُدُودَهُۥ يُدْخِلْهُ نَارًا خَـٰلِدًۭا فِيهَا وَلَهُۥ عَذَابٌۭ مُّهِينٌۭ
وَٱلَّـٰتِى يَأْتِينَ ٱلْفَـٰحِشَةَ مِن نِّسَآئِكُمْ فَٱسْتَشْهِدُوا۟ عَلَيْهِنَّ أَرْبَعَةًۭ مِّنكُمْ ۖ فَإِن شَهِدُوا۟ فَأَمْسِكُوهُنَّ فِى ٱلْبُيُوتِ حَتَّىٰ يَتَوَفَّىٰهُنَّ ٱلْمَوْتُ أَوْ يَجْعَلَ ٱللَّهُ لَهُنَّ سَبِيلًۭا
وَٱلَّذَانِ يَأْتِيَـٰنِهَا مِنكُمْ فَـَٔاذُوهُمَا ۖ فَإِن تَابَا وَأَصْلَحَا فَأَعْرِضُوا۟ عَنْهُمَآ ۗ إِنَّ ٱللَّهَ كَانَ تَوَّابًۭا رَّحِيمًا
سورة ٱلنِّسَاء ، ٤:١٣ - ٤:١٦
كتاب القرآن الكريم