Legend attributes the creation of Japan to the sun goddess, from whom the emperors were descended. The first of them was Jimmu, supposed to have ascended the throne in 660 B.C., a tradition that constituted official doctrine until 1945.
Recorded Japanese history begins in approximately A.D. 400, when the Yamato clan, eventually based in Kyoto, managed to gain control of other family groups in central and western Japan. Contact with Korea introduced Buddhism to Japan at about this time. Through the 700s Japan was much influenced by China, and the Yamato clan set up an imperial court similar to that of China. In the ensuing centuries, the authority of the imperial court was undermined as powerful gentry families vied for control.
First contact with the West came in about 1542, when a Portuguese ship off course arrived in Japanese waters. Portuguese traders, Jesuit missionaries, and Spanish, Dutch, and English traders followed. Suspicious of Christianity and of Portuguese support of a local Japanese revolt, the shoguns of the Tokugawa period (1603–1867) prohibited all trade with foreign countries; only a Dutch trading post at Nagasaki was permitted. Western attempts to renew trading relations failed until 1853, when Commodore Matthew Perry sailed an American fleet into Tokyo Bay. Trade with the West was forced upon Japan under terms less than favorable to the Japanese. Strife caused by these actions brought down the feudal world of the shoguns. In 1868, the emperor Meiji came to the throne, and the shogun system was abolished.
At the Washington Conference of 1921–1922, Japan agreed to respect Chinese national integrity, but, in 1931, it invaded Manchuria. The following year, Japan set up this area as a puppet state. Relations between Japan and China reached new lows in April 2005, when thousands of Chinese, with tacit government approval. In August, Koizumi called for early elections. Koizumi won a landslide victory in September, with his Liberal Democrat party securing its biggest majority since 1986.