The Imjin War (Korean: 임진왜란; Hanja: 壬辰倭亂) was a series of two Japanese invasions of Korea: an initial invasion in 1592 also individually called the "Imjin War", a brief truce in 1596, and a second invasion in 1597 called the Chŏngyu War (정유재란; 丁酉再亂). The conflict ended in 1598 with the withdrawal of Japanese forces from the Korean Peninsula after a military stalemate in Korea's southern provinces.
The invasions were launched by Toyotomi Hideyoshi with the intent of conquering the Korean Peninsula and China proper, which were ruled by the Joseon and Ming dynasties, respectively. 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. The first phase of the invasion ended in 1596, and was followed afterwards by ultimately unsuccessful peace negotiations between Japan and the Ming.