Peru was shaken by a powerful earthquake late Friday that damaged some houses and disrupted power in a central district.