imjin war
A war between 1592 and 1598 between the the Toyotomi shogunate and the Joseon dynasty, with the latter being supported by their suzerain, the Ming dynasty.
Japan quickly succeeded in occupying large portions of the Korean Peninsula, but the contribution of reinforcements by the Ming, as well as the disruption of Japanese supply fleets along the western and southern coasts by the Joseon navy, forced the Japanese forces to withdraw from Pyongyang and the northern provinces. Afterwards, with righteous armies (Joseon civilian militias) conducting guerrilla warfare against the occupying Japanese forces and supply difficulties hampering both sides, neither force was able to mount a successful offensive or gain any additional territory, resulting in a military stalemate.
With Toyotomi Hideyoshi's death in 1598, limited progress on land, and continued disruption of supply lines by the Joseon navy, the Japanese forces in Korea were ordered to withdraw back to Japan by the new governing Council of Five Elders. Final peace negotiations between the parties followed, and continued for several years, ultimately resulting in the normalization of relations.