The Imjin War — the Japanese invasions of Korea, or the Bunroku-Keicho campaigns in Japan — was the war of 1592-1598 in which Toyotomi Hideyoshi, under the cover story of 'passing through Korea to invade Ming', attacked Korea in two great waves. In the fourth month of 1592 some 150,000 Japanese troops landed at Busan, took Seoul in twenty days, and Kaesong and Pyongyang within two months; King Seonjo of Joseon fled north to Uiju and called on the Ming. The first Ming relief columns stumbled; the Wanli emperor then sent great armies in. In January 1593 Li Rusong retook Pyongyang, and after the action at Byeokjegwan the two sides locked along the Seoul line, truce talks dragging for years. In 1597 the peace collapsed and 140,000 Japanese came again (the Jeongyu war); the Korean navy — Yi Sun-sin's stand at Myeongnyang — held the sea, Ming armies returned, and the fights at Ulsan, Sacheon and Suncheon swung either way. When Hideyoshi died in 1598 the invasion was called off; the Ming-Korean fleets intercepted the withdrawal at the battle of Noryang, where Yi Sun-sin and the Ming admiral Deng Zilong both died in the hour of victory. Seven years left Korea's eight provinces broken and its population shrunk, cost the Ming millions of taels — and the Toyotomi regime, spent and split, fell soon after Hideyoshi's death, while Tokugawa Ieyasu's Edo shogunate turned defensively inward from the sea.