In the 1590 Odawara Campaign, Maeda Toshiie led the northern army with Uesugi Kagekatsu and Sanada Masayuki and, after Hachioji, besieged Hachigata Castle. The commander Hojo Ujikuni held out about a month with 3,000 men, but Toshiie's side secured a surrender on terms sparing his soldiers' lives. Ujikuni took Buddhist vows and entered Toshiie's service as a guest retainer.