Umar bin Khattab reported,

He had made a vow during the days of ignorance to observe itikaf for one night, so he asked the Prophet ﷺ about it, and he instructed him to fulfill the itikaf.

Ibn Majah 1772

Sahih

حدثنا إسحق بن موسى الخطمي حدثنا سفيان بن عيينة عن أيوب عن نافع عن ابن عمر

عن عمر

أنه كان عليه نذر ليلة في الجاهلية يعتكفها فسأل النبي ﷺ فأمره أن يعتكف

ابن ماجه 1772صحيح
Contents
Reference
Commentary
Ayat
Collection
Sunan Ibn Majah
Book
Fasting
Chapter
Itikaf for a day or a night
Numbering
Darussalam 1772
Ibn Majah 1772