He then returned to Buenos Aires where he reassumed the post of Viceroy on 15 October 1777. He introduced the Law of free Commerce of 1778, which allowed Buenos Aires to trade directly with Spain, instead of being forced to trade by way of the Viceroyalty of Peru. He also forbid to move silver out of the limits of the Viceroyalty.