Where does “天神地祇” come from?

天神地祇 (Japanese) comes from Japanese 天神, from Middle Chinese 神.

天神地祇 (Japanese): heavenly gods and earthly gods; all the gods

Definitions

  1. heavenly gods and earthly gods; all the gods

Ancestry of “天神地祇”, step by step

天神地祇 traces back through two separate lines of ancestry.

via Japanese 天神

StepLanguageWordMeaning
1Japanese天神the Japanese gods of the heavens; a noble wearing...
2Middle Chinese

via Japanese 地祇

StepLanguageWordMeaning
1Japanese地祇earthly deities; the gods of the earth
Every word from Middle Chinese Every word from Japanese 天神