Kitano Tenmangū was founded in 947 to placate the angry spirit of the ninth-century court scholar Sugawara no Michizane, who had died in exile a few decades earlier; a series of natural disasters and outbreaks of plague had been attributed to his vengeance from beyond the grave. Once enshrined, the same Michizane gradually became Tenjin, the deity of scholarship and learning, and the shrine became a national pilgrimage destination for students and academics — most modern visitors are still here for some examination-related prayer.
The shrine is also one of Kyoto's main ume (plum) spots, with two thousand plum trees flowering across the precinct in February. On the 25th of each month, a long flea market (Tenjin-san) takes over the shrine grounds — pottery, antiques, kimono, second-hand books, plants, food stalls — and is one of the best in Kyoto, second only to Tō-ji's. The neighbouring district of Kamishichiken, the oldest of Kyoto's five hanamachi, is worth a stroll afterwards.