 To protect the country from the attacks by English, French and Dutch pirates, as well as the Crown's revenue, only two ports were open to foreign trade—Veracruz on the Atlantic and Acapulco on the Pacific.Pirates attacked, plundered and ravaged several cities like Campeche (1557), Veracruz (1568) and Alvarado (1667).Education was encouraged by the Crown from the very beginning, and Mexico boasts the first primary school (Texcoco, 1523), first university, the University of Mexico(1551) and the first printing press (1524) of the Americas.