He had enacted laws and regulations that were still in force when Pedro de Heredia invaded the country.