The Messenger of Allah ﷺ said, "There are three whom Allah has bound Himself to help: the one who strives in the path of Allah, the slave with a contract to buy his freedom who intends to fulfill his payment, and the one who marries seeking chastity."
حدثنا قتيبة حدثنا الليث عن ابن عجلان عن سعيد المقبري
قال رسول الله ﷺ ثلاثة حق على الله عونهم المجاهد في سبيل الله والمكاتب الذي يريد الأداء والناكح الذي يريد العفاف
Its isnad is hasan. Nasai also narrated it in the Book of Jihad, in the chapter on the merit of setting out in the afternoon in the cause of Allah , 6/15, 16, hadith 22, 31, and Ibn Majah, hadith 2518, from the hadith of Muhammad bin Ajlan with the same wording, and he made explicit mention of having heard it directly, as recorded by Ahmad, 2/437.