Communications were inconvenient: goods from Hanoi or Haiphong were shipped to Hekou on the Vietnamese border by junk, transferred by small craft to Manhao, and then taken by pack animal to Mengzi. Despite these difficulties, Mengzi was an important port of entry into both Yunnan and western Guizhou provinces, and in 1889 it was opened to foreign trade as a treaty port. Most of this foreign trade was in tin and opium. Its main exports were tin and opium, and the main imports were mostly textiles (primarily cotton) and tobacco.