 In addition, there were groups such as the Satsuma Tonya and the Matsumae clan Tonya, who specialized in the handling and transportation of goods within two of Japan's four great "gates" to the outside world; Matsumae, in Hokkaidō, governed the trade with the Ainu and Imperial Russia, while Satsuma, in Kyūshū, controlled trade with the Ryūkyū Kingdom and, through them, trade with Qing China.Between the "ton'ya" and the numerous other types of groups in Osaka and Edo, including "kabunakama", "rakuza", and rice brokers, Japan's primary urban commercial centers were extremely organized and powerful by the middle of the Edo period.Most of these groups would dissolve or evolve into something else entirely by the end of the Edo period, but they served an important role in facilitating the emergence of fully nationwide trade in early modern Japan.