 On the death of Viceroy Lorenzo Suárez de Mendoza in June 1583, Villanueva y Zapata became acting viceroy of the colony in virtue of his position as dean of the Audiencia.This made him the royal official in charge of Spanish possessions north of Peru, including both present-day Mexico and Central America (except for Panama).This was a difficult period for the government, which had to combat a sense of insecurity in the colony.