A magnitude 6.9 earthquake that struck off the coast of southern Peru on Friday shook buildings in Lima and injured 83 people near the city of Ica, civil defense officials said on Saturday.