The term derives from Middle Iranian terms xvatay, xwadag meaning "lord", "ruler", "master", appearing in written form in Parthian kwdy, in Middle Persian kwdy, and in Sogdian kwdy. It is the Middle Persian reflex of older Iranian forms such as Avestan xva-dhata- "self-defined; autocrat", an epithet of Ahura Mazda. The Pashto term Xdāi (خدۍ).