Pimiko (175?-248), pronounced "Himiko" in modern Japanese, was the shaman-queen of the kingdom of Yamatai in what is now Japan, and is the earliest-known historical figure in Japanese History.
The people of the Japanese isles did not use writing to any real extent before the 700s, but a Chinese historical chronicle written in 297, The History of the Kingdom of Wei, records that in the year 239 the Chinese kingdom of Wei received an embassy from a Queen named Pimiko in the year 239, and goes on to describe Pimiko's society.
According to the chronicle, Pimiko had shamanic powers ruled her kingdom through the power of her sorcery. She remained celebate throughout her life and was rarely seen by the populace. She is said to have had 1,000 female attendants but only a single male attendant, who served her meals and communicated her orders to the people.
Pimiko's realm was described as a sort of loose confederation of over thirty allied states, and her people were said to be exceptionally long-lived, obsessed with cleanliness (bathing frequently), and enamored of strong alcoholic drink.
A later entry in the chronicle notes that when Pimiko died in 248, a massive earthen tomb was erected in her honor. Rule then passed to Pimiko's brother, but a period of strife ensued so the people of Yamatai once again turned to a female ruler and named Pimiko's granddaughter Iyo as queen.
Pimiko's exact identity and the location of her kingdom of Yamatai remain in dispute. The earliest Japanese historical chronicle, the Nihon Shoki, which was written hundreds of years later in the 8th century, identifies Pimiko as another name for Empress Jingû, the mother of Emperor Ôjin, but modern historians disagree. Some have argued that Pimiko was actually Yamato-hime-no-mikoto, a daughter of Emperor Suinin, who was said to have reigned from the A.D. 29-70, but this theory has little historical basis. Still others have argued that the Chinese were just confused and were taking the Japanese sun goddess Amaterasu to be an actual female ruler.
What all of these theories are trying to do is to reconcile the evidence from the Chinese chronicle with the traditional Japanese lineage of (mostly male) emperors going back to the first emperor Jimmu who supposedly ascended to the throne in 660 BC. But the more likely scenario is that the traditional lineage of emperors is mostly fabricated prior to the 5th century, and that in Pimiko's time there was actually a strong tradition of female rule. This explanation fits nicely with other evidence we have of a strong female fertility cult in the Japanese isles dating back to the early Yayoi Period.
It may even be that the name "Pimiko" was not the name of a specific individual, but rather a title that was conferred upon a succession of shaman-queens. Although the name "Pimiko" comes from a Chinese transliteration, in Japanese "Pi" means "sun" and "miko" means "priestess," so "Pimiko" literally means "Sun Priestess." This theory would help explain a cryptic entry in the Korean chronicle Samguk Sagi, which records a queen "Pimiko" of Japan sending an emmisary to King Adalla of Silla in 172 - presumably, this Pimiko would have been an earlier, different queen.