(Translated by Google) This is Baekjeo Shrine, the local guardian deity in my neighborhood. (It was also the clan temple called "Baekje-ji").
The deity enshrined in the main hall is the King of Baekje, Gozu Tenno, and Susanoo-no-mikoto.
Baekje was the "country" of the Baekje royal family on the Korean peninsula.
According to one theory, the Baekje family brought "kanji" to Japan.
(Apparently, there is a description of this in the Nihon Shoki.)
The Baekje family, whose country was destroyed in the Battle of Baekgang, the greatest crisis in ancient Japan, fled to Japan with their lives and started managing this land. (One theory is that Baekje was destroyed first.)
After being beaten badly by the combined forces of Tang and Silla on the Korean Peninsula, they came to Japan and served the Imperial Court in various ways, saying, "Japan helped us out, we need to repay them." (Sorry, I don't know much about this. Please let me know if I'm wrong.)
This was during the reign of Emperor Tenchi, and I think Japan was extremely worried at the time (a national crisis), thinking, "Damn, if we keep going like this, we'll be defeated by Tang!"
I'm sure Baekje cooperated, saying, "We've been helped out by them, so let's help out in various ways. Chinese characters are useful for transmitting information, and we know a lot about the Korean Peninsula, so let's go spy on them!"
I think their achievements were recognized, and Baekje Temple was built in Kawachi... (This is just my own fantasy.)
(Original)
うちの近所にある氏神さん百濟王神社です。(「百済寺」という氏寺でもありました。)
本殿の御祭神は、百濟國王(くだらこくおう)・牛頭天王(ごずてんのう) / 進雄命(すさのおのみこと)です。
百濟は、朝鮮半島にあった百濟王族の「国」でした。
一説によれば、この百濟一族が日本に「漢字」を伝えたとも言われています。
(日本書紀に記述があるらしい。)
日本古代での最大級の危機、白村江の戦いで国を滅ぼされた百済一族は日本に命からがら逃げきて、この地を管理したのが始まりだそうです。(一説には、先に百済は滅亡させられていたとの説もあり。)
朝鮮半島で、唐と新羅の連合軍にボコボコにやられて、日本にやってきて、「日本さんに助けられたわ、恩返しせな。」と色々朝廷に仕えたみたいです。(すみません、そんなに詳しくないです。間違えていたら、教えてください。)
時は、天智天皇の頃、「ヤベェ、このままじゃ、唐にやられるぞ!」と、当時の日本にとっては、めちゃくちゃ焦った(国難)と思います。
きっと、百済さんは、「わしもお世話になったから、色々手伝わせてください。漢字って情報伝達に便利やし、朝鮮半島のことは詳しいから、わしらスパイに行きまっさ!」みたいな感じで、協力したのではないかな?
その功績が認められて、河内の地に百済寺を建てることになったのでは・・・と。(ココは私の勝手な妄想です。)