Quanzhou was China's major port for foreign traders, who knew it as Zaiton, during the 11th through 14th centuries. It was visited by both Marco Polo and Ibn Battuta; both travelers praised it as one of the most prosperous and glorious cities in the world. It was the naval base from which the Mongol attacks on Japan and Java were primarily launched and a cosmopolitan center with Buddhist and Hindu temples, Islamic mosques, and Christian churches, including a Catholic cathedral and Franciscan friaries. A failed revolt prompted a massacre of the city's foreign communities in 1357. Economic dislocations—including piracy and an imperial overreaction to it during the Ming and Qing—reduced its prosperity, with Japanese trade shifting to Ningbo and Zhapu and other foreign trade restricted to Guangzhou. Quanzhou became an opium-smuggling center in the 19th century but the siltation of its harbor hindered trade by larger ships.