The Niō are a pair of protectors who commonly stand guard outside the temple gate at Japanese Buddhist temples, one on either side of the entrance. The open-mouth version is commonly placed to the right of the temple, the closed-mouth version to the left. In Japan, the gate itself is often called the Niō-mon (literally Niō Gate). At Shintō shrines, however, the Niō guardians are replaced with a pair of koma-inu (shishi lion-dogs) or with two foxes. These mythical and magical shrine guardians are commonly (but not always) depicted with similar iconography — one mouth open, one closed.
The Niō’s fierce and threatening appearance is said to ward off evil spirits and keep the temple grounds free of demons and thieves. In some accounts, the Niō were said to have followed and protected the Historical Buddha when he traveled throughout India. They have since been adopted by the Japanese into the Japanese Buddhist pantheon. Each is named after a particular cosmic sound. The open-mouth figure is called “Agyō,” who is uttering the sound “ah,” meaning birth. His close-mouth partner is called “Ungyō,” who sounds “un” or “om,” meaning death.
This post was written based on https://www.onmarkproductions.com. Pictures from Shiokoku 88.