The king suffered from a headache and the prophet advised the head hakim in a dream that hitting the king with a shoe on the painful area would cure him. Associates of the hakim enacted the plan using a decorated gold-threaded shoe to hit the king, killing a mosquito and curing his ache. The king appreciated the shoe's design and decided to patronize the hakim's work, with other emperors and nobles following his example.