▁his ▁departure , ▁he ▁appointed ▁Ab u ▁Du j ana ▁Ans ari ▁as ▁governor ▁of ▁Med ina ▁during ▁his ▁own ▁absence . ▁On ▁the ▁ 2 5 th ▁of ▁D hu ▁al - Q i ' d ah , ▁ 4 ▁night s ▁before ▁the ▁end ▁of ▁D hu ▁al - Q i ' d ah ▁( F ebru ary ▁ 6 3 2 ), ▁he ▁left ▁Med ina , ▁accompanied ▁by ▁all ▁his ▁w ives . ▁ ▁W ear ing ▁I hr am ▁Before ▁arriv ing ▁in ▁Me cca , ▁Muhammad ▁stayed ▁at ▁Mi q at ▁and ▁taught ▁people ▁the ▁manner ▁of ▁we aring ▁I hr am . ▁He ▁first ▁performed ▁g hus l ▁( rit ual ▁bath ) ▁before ▁putting ▁on ▁I hr am ▁for ▁H aj j . ▁ ▁The ▁cl othing ▁while ▁in ▁the ▁state ▁of ▁I hr am ▁consisted ▁of ▁two ▁pieces ▁of ▁Y em eni ▁un se wed ▁white ▁cot ton , ▁which ▁later ▁on ▁became ▁his ▁shr oud . ▁Muhammad ▁then ▁did ▁his ▁no on ▁pray ers ▁in ▁the ▁mos que ▁of ▁Sh aj ara . ▁In ▁later ▁Islam ic ▁history , ▁Muslim s ▁built ▁mos ques ▁at ▁the ▁places ▁Muhammad ▁stayed ▁and ▁pray ed ▁during ▁this ▁time . ▁ ▁Do ing ▁rit uals ▁ ▁Circ um amb ulation ▁and ▁pray ers ▁The ▁next ▁day , ▁Muhammad ▁and ▁his ▁compan ions ▁arrived ▁at ▁the ▁Mas j id ▁al - H aram . ▁They ▁entered ▁from ▁the ▁gate ▁of ▁Dar ▁al - Sal am , ▁approached ▁the