|Part of a series on|
|Chinese folk religion|
|Chinese folk religion's portal|
Xuánwǔ (玄武 "Dark Warrior" or "Mysterious Warrior") or Xuándì (玄帝 "Dark Deity"), also known as Zhēnwǔ (真武) or Zhēnwǔdàdì (真武大帝 "True Warrior Great Deity"), is a deity in Chinese religion, and one of the higher-ranking deities in Taoism. He is revered as a powerful god, able to control the elements and capable of great magic. He is identified as the god of the north Hēidì (黑帝 "Black Deity") and is particularly revered by martial artists. He is the patron deity of Hebei, Manchuria and Mongolia. As some Cantonese and Southern Min speakers (particularly Hokkien) fled into the south from Hebei with the Song dynasty, Xuanwu is also widely revered in Fujian and Guangdong as well as among the Chinese diaspora.
Since the usurping Yongle Emperor of the Ming dynasty claimed the help of Xuanwu during his successful Jingnan Campaign against his nephew, he had Taoist monasteries constructed in the Wudang Mountains of Hubei, where Xuanwu allegedly attained immortality.
The original story
One story says that Xuanwu was originally a prince of Jing Le State in northern Hebei during the time of the Yellow Emperor. As he grew up, he felt the sorrow and pain of the life of ordinary people and wanted to retire to a remote mountain for cultivation of the Tao. 
Qing Dynasty's version
Another says that Xuanwu was originally a butcher who had killed many animals unremorsefully. As days passed, he felt remorse for his sins and repented immediately by giving up butchery and retired to a remote mountain for cultivation of the Tao.
One day while he was assisting a woman in labor, while cleaning the woman’s blood stained clothes along a river, the words "Dark (or Mysterious) Heavenly Highest Deity" (玄天上帝 Xuántiān Shàngdì) appeared before him. The woman in labor turned out to be a manifestation of the goddess Guanyin. To redeem his sins, he dug out his own stomach and intestines and washed them in the river. The river turned into a dark, murky water. After a while, the river flowed pure again.
Unfortunately, Xuanwu lost his stomach and intestines while he was washing them in the river. The Jade Emperor was moved by his sincerity and determination to clear his sins. The Jade Emperor made him an immortal with the title of Xuántiān Shàngdì.
After he became an immortal, his stomach and intestines absorbed the essence of the earth. His viscera transformed into a demonic turtle, and a demonic snake, who started to hurt people. No one could subdue the demonic animals. Eventually, Xuanwu returned to earth to subdue them. After defeating them, he later used them as his means of transportation.
Generals Wan Gong and Wan Ma
Xuanwu is sometimes portrayed with two generals standing besides him, General Wan Gong (萬公) and General Wan Ma (萬媽). The two generals are deities that handle many local issues from children's birth, medication, family matters as well as fengshui consultation.
Xuanwu is portrayed as a warrior in imperial robes, his left hand holds the "three mountain seal", somewhat similar to Guan Yu's hand seal, while the right hand holds a sword, which is said to have belonged to Lü Dongbin, one of the Eight Immortals.
Another legend says that he borrowed the sword from Lü Dongbin to subdue a powerful demon, and after being successful, he refused to bring it back after witnessing the sword's power. The sword itself would magically return to its owner if Xuanwu released it, so it is said that he always holds his sword tightly, and is unable to release it. However, not only does he outrank Lü in terms of divinity, Xuanwu also dates back longer in history than Lü Dongbin, putting this claim in suspect.
He is usually seated on a throne with the right foot stepping on the snake and left leg extended stepping on the turtle. His face is usually red with bulging eyes. His birthday is celebrated on the third day of the third lunar month.
Cult in Indonesia
In Indonesia, almost every Taoist temples provides an altar for Xuantian Shangdi. The story states that the first temple that worshiped him was a temple at Welahan Town, Jepara, Central Java. And the temples that was built in honor of him are the temple at Gerajen and Bugangan, Semarang City, Central Java. His festival is celebrated annually every the 25th day, 2nd month, of Chinese calendar. The worshipers of Chen Fu Zhen Ren, especially at Tik Liong Tian Temple, Rogojampi, Banyuwangi Regency, East Java, believe that Xuantian Shangdi is their patron deity. That's why they put his altar at the right side of Chen Fu Zhen Ren’s altar, in the middle room of the temple which is always reserved for the main deity.
- In the classic novel Journey to the West, Xuanwu was a king of the north who had two generals serving under him, a "Tortoise General" and a "Snake General". This king had a temple at Wudang Mountains in Hubei, thus there is a Tortoise Mountain and a Snake Mountain on the opposite sides of a river in Wuhan, the capital of Hubei.
- In recent times, Xuanwu is a central character in the popular urban fantasy series' by Kylie Chan: The Dark Heavens Trilogy and the Journey to Wudang Trilogy.
- Black Tortoise or Turtle, the Chinese mythological figure and astronomical symbol known by the same name
- [Citation Needed]