The Toi invasion (Japanese: 刀伊の入寇 toi no nyūkō) was the invasion of northern Kyūshū by Jurchen pirates in 1019. At the time, Toi (되, Doe) meant "barbarian" in the Korean language.
The Toi pirates sailed with about 50 ships from direction of Goryeo, then assaulted Iki, Tsushima and then Hakata Bay. For a week, using Noko Island (能古島 noko no shima) in the bay as a base, they sacked villages and kidnapped over 1,000 Japanese, mostly women and young girls, for use as slaves. The Dazaifu, the administrative center of Kyūshū, then raised an army and successfully drove the pirates away.
Three enemies were captured by the Japanese army in Matsura, they were identified as Koreans. They said that they had guarded the borderland but had been captured by the Toi. However this was unlikely, and the Japanese officers suspected them because there had been Korean pirates attacking Japan coasts in the former Silla period. A few months later, the Goryeo delegate Jeong Jaryang (鄭子良) reported that Goryeo forces attacked the pirates off Wŏnsan and rescued about 260 Japanese. The Korean government then repatriated them to Japan where they were thanked by the Dazaifu and given rewards. There remain detailed reports by two captive women, Kura no Iwame and Tajihi no Akomi.
These Jurchen pirates lived in what is today Hamgyŏngdo, North Korea.