For four and a half centuries, few Japanese monks had gone abroad, and foreign trade had been in the hands of the Koreans and Chinese, but in the Kamakura period the Japanese once more began to take part in foreign commerce. At the same time, Japanese pirates began to raid and plunder the coasts of Korea and China; in time they became a serious nuisance and occasionally even a menace to both countries.