During his reign, the Portuguese became the first Europeans to make contact with both China, under the Ming Dynasty, and Japan, during the Muromachi period. He abandoned Muslim territories in North Africa in favor of trade with India and investment in Brazil. In Europe, he improved relations with the Baltic region and the Rhineland, hoping that this would bolster Portuguese trade.