In the middle of the ninth century the Samaurii, or military caste, whose descendants to-day provide the bulk of naval officers, first began to arise. The Shoguns, afterwards to become such a power, were originally generals, there being one in command of each of the four military districts into which the Emperor Sujin had divided Japan. A Shogun with any special powers did not arise till the year 1200 or so, when Yoshinaka made himself Sei-i-Shogun (Chief Shogun).
As he was driven to suicide soon afterwards in the civil war then desolating the empire, the post did not convey any great advantage to him; but Yaritomo whose troops had defeated him, became after a time Sei-i-tai-Shogun (great barbarian compelling Shogun). This civil war—between the Taira and the Minamoto clans—culminated in a naval battle. The former are credited with 500 junks, which, in addition to the soldiers, were crowded with women and children and the fugitive emperor. At Dan-no-ura, on the Inland Sea, these were overtaken by the Minamoto with 700 vessels, and the smaller fleet was annihilated. This decisive action ended the civil war, but it created the system of Shogun rule, whereby all the governing of the country was in the hands of Yoritomo, the Emperor being a mere figure-head and puppet in his hands.
The descendants of Yaritomo, as Shoguns de jure, did not exercise much power de facto, for regents (the Hojo) acted for them. In time, too, tutors came to act for the regents, and under this condition of government, plunged into a species of anarchy, Japan faced the great Chinese invasion of 1281.
Having resolved on the capture of Japan, the Chinese sent envoys demanding its surrender. These, after being sent from pillar to post in a search for the real governing power, were eventually killed by the populace. The Chinese then prepared a fleet of 300 of their own and Korean ships, added the Japanese sun to the consuming dragon on the Chinese flag, and invaded to consummate the capture. On the water they encountered no opposition, but on landing they were met and defeated by the Japanese, united in the presence of a common danger. A great storm at the same time destroyed the hostile fleet, and the invasion was at an end.
It was followed by more internal strife, till in 1333 the Hojo were finally put down. Shortly afterwards the chief power came into the hands of the Shoguns.
Despite the civil warfare, Japan still made headway as a maritime State. Trade and piracy were conducted not only with Korea and China, but Japanese vessels sailed regularly to the distant shores of Siam.
In 1542 the Portuguese first came into touch with Japan. Three cannon were presented to the Shogun, and a little later Pinto arrived on the scene, and taught the manufacture of gunpowder. Jesuits followed, and made such headway that in the next civil war the Christian Japanese, to the number of 600,000 or more, were a strong political factor.
In 1587 Hideyoshi the Taikio, the de facto ruler of Japan, issued an edict against the Christians, many missionaries were expelled, and the ports open to foreign vessels were finally limited to one only, Nagasaki, as at that time the suspicion first began that soldiers would presently follow the missionaries.
About the same period Hideyoshi, who had designs upon China and Korea, began to prepare warships. He also endeavoured to create a fleet of European-built ships, but the traders whom he approached on the matter refused to sell their vessels. He had, therefore, to content himself with a junk navy, which was raised much as fleets were raised in England at the same period, by levies upon the coast districts. The princes of these districts were required to furnish sailors to man the ships that they provided.
The invasion of Korea was carried out by two divisions, the first of which, under Konishi, reached Fusan on April 13, 1592. The town, which had for some two hundred years been used as a Japanese trading port, was easily captured, and the army then marched to the capital. The fleet lay inactive at Fusan for some time, but Konishi, in the midst of a victorious career on land, presently conceived the idea of using his fleet also. It was, therefore, sent round to the westward, where it met a Korean fleet.