The war-god is a historical personality, the bean-curd seller Zhang (162-220 CE). He changed his name into Guan and became a renowned adventurer and general. As general Guan Yu he served under the founder of one of the three realms. In 220 CE he was executed on the orders of a hostile ruler. His cult is of relatively recent origin and was strongly influenced by Buddhist ideas. His veneration began somewhere around the 7th century CE, and even spread to Korea. In 1594 he was canonized by a Ming Dynasty emperor as god of war and protector of China and its people, and was accorded the title of Great Just Emperor Who Assists Heaven and Protects the State in the 16th century and was admitted to the Taoist pantheon. The title of Military Emperor was bestowed upon him in the 19th century by the then emperor of China who elevated him to the level of Confucius.
Guan-di was also worshipped as the protector of state officials who accorded him special veneration. The government sponsored the building of thousands of temples throughout the realm. In those temples the swords of public executioners were housed. Imperial official made offerings to him on the thirteenth day of the first and fifth month of each year; a practice that continued until the end of the Chinese empire in 1911.
Guan-di is portrayed as a nine-foot tall giant with a two-foot-long beard, a scarlet face, the eyes of a phoenix and eyebrows of silkworms. He is frequently shown standing beside his horse, wearing full armor and carrying a halberd. Alternatively he is portrayed as a military mandarin, sitting unarmed and stroking his beard with one hand and holding the Chun-qiu (the Spring and the Autumn Annals, one of the classic Confucianist works) in his other hand.
In popular belief he is known primarily for casting out demons and people call him Fu-mo da-di, the Great Ruler Who Banishes Demons. His festival is May 13.