Behold, no person should spend the night with a married woman, but only in case he is married to her or he is her Mahram.
Sahih Muslim Book 39, Hadith 27