In Buddhism the Chintamani is said to be one of four relics that came in a chest that fell from the sky (many terma fell from the sky in caskets) during the reign of king Lha Thothori Nyantsen of Tibet.
Moreover, it should be stated that the falling of Buddhadharma relics upon a Tibetan royal palace also happened in the case of Thothori Nyantsen and these two stories (i.e. the story of Thothori Nyantsen and the narrative of King Ja) may have influenced each other as they share a distinctive motif of magical realism.