The Messenger of Allah ﷺ said, "Whoever dies without an obligation of obedience upon him dies the death of ignorance. Whoever casts off allegiance after pledging it around his neck will meet Allah with no argument to offer. No man should be alone with a woman who is not lawful for him, for the third of them is Satan, except in the case of a Muharram. Satan is with one person, but stays farther away from two. Whoever is grieved by his bad deeds and pleased by his good deeds is a believer."Husayn said, "After pledging it around his neck."
حدثنا أبو النضر وحسين قالا حدثنا شريك عن عاصم بن عبيد الله
قال رسول الله ﷺ من مات وليست عليه طاعة مات ميتة جاهلية فإن خلعها من بعد عقدها في عنقه لقي الله تبارك وتعالى وليست له حجة ألا لا يخلون رجل بامرأة لا تحل له فإن ثالثهما الشيطان إلا محرم فإن الشيطان مع الواحد وهو من الاثنين أبعد من ساءته سيئته وسرته حسنته فهو مؤمن قال حسين بعد عقده إياها في عنقه
Its chain of transmission is hasan, because of Sharik and Asim. Haythami 5/223 deemed it daif because of Asim, while Tirmidhi 4/465, no. 2165, said it is hasan sahih gharib.