The naval history of China dates back thousands of years, with archives existing since the late Spring and Autumn period regarding the Chinese navy and the various ship types employed in wars. The Ming dynasty of China was the leading global maritime power between 1400 and 1433, when Chinese shipbuilders built massive ocean-going junks and the Chinese imperial court launched seven maritime voyages. In modern times, the current People's Republic of China and the Republic of China governments continue to maintain standing navies through the People's Liberation Army Navy and the Republic of China Navy, respectively.
The Han dynasty established the first independent naval force in China, the Tower Ship Navy.
Although naval battles took place before the 12th century, such as the large-scale Three Kingdoms Battle of Chibi in the year 208, it was during the Song Dynasty (960–1279) that the Chinese established a permanent, standing navy in 1132. At its height by the late 12th century there were 20 squadrons of some 52,000 marines, with the admiral's headquarters at Dinghai, while the main base remained closer to modern Shanghai. The establishment of the permanent navy by the Southern Song Dynasty came out of the need to defend against the Jin dynasty, who had overrun the northern China, and to escort merchant fleets entering the Southeast Pacific and Indian Ocean on long trade missions abroad to the Hindu, Islamic, and East African spheres of the world. However, considering various Central Plain polities were for a long time menaced by land-based nomadic tribes such as the Xiongnu, Göktürks, Khitans and Mongols, the navy was seen as an adjunct rather than an important military force. By the 1516th centuries China's canal system and internal economy were sufficiently developed to nullify the need for the Pacific fleet, which was scuttled when conservative Confucianists gained power in the court and began a policy of introspection. After the First and Second Opium Wars, which shook up the generals of the Qing dynasty, the government attached greater importance to the navy.