During the late 18th century, the New Spain government encouraged the expansion of trade and development of commodity crops. Among these was tobacco, and lands in Cagayan became the center of a vertically integrated monopoly: tobacco was grown there and shipped to Manila, where it was processed and made into cigarettes and cigars. The development of the related bureaucracy and accounting systems was done under the leadership of José de Gálvez, who as visitor-general to Mexico from 1765 to 1772 developed the monopoly there and increased revenues to the Crown. He worked in the Philippines as Minister of the Indies from 1776 to 1787, constructing a similar monopoly there under Governor-General Basco y Vargas (1778–1787). The Spanish development of this industry affected all their economic gains in the Philippines.