LOS ANGELES (AP) — A moderate earthquake that rattled a swath of Southern California forced several dozen people in one community out of their homes after firefighters discovered foundation problems that made the buildings unsafe to enter, authorities said Saturday.

Fire crews red-tagged 20 apartment units in a building in the Orange County city of Fullerton after finding a major foundation crack. Structural woes, including broken chimneys and leaning, were uncovered in half a dozen single-family houses, which were also deemed unsafe to occupy until building inspectors clear the structures. The damage displaced 83 residents.

Despite the evacuations and scattered damage, Friday night’s magnitude-5.1 earthquake centered about 25 miles south of downtown Los Angeles mostly frayed nerves.

The quake was preceded by two smaller foreshocks. More than 100 aftershocks followed, including a magnitude-4.1 that hit Saturday afternoon, the largest in the sequence so far that was felt over a wide region. No injuries were reported.

Residents were inconvenienced and some lost valuables, but “thankfully the damage wasn’t greater,” said Chi-Chung Keung, a spokesman for the city of Fullerton.

Business owners in Orange County spent the aftermath sweeping up shattered glass and restocking shelves. Utility crews worked to restore power and shut off gas leaks and water-main breaks. A rock slide in the Carbon Canyon area of nearby Brea also caused a car to overturn. The occupants had minor injuries, and the road remained closed to traffic.

The Red Cross opened a shelter in neighboring La Habra but closed it once the 38 people who stayed overnight returned home.

“Everything is starting to get settled down here,” La Habra police Sgt. Mel Ruiz said.

In Fullerton, some residents will have to stay elsewhere until building inspectors can check out the red-tagged apartments and houses and give an all-clear, Fire Battalion Chief John Stokes said.

Another 14 residential structures around the city suffered lesser damage, including collapsed fireplaces. Shortly after the main earthquake, the city dealt with a dozen water-main breaks and multiple natural-gas leaks, Stokes said.

A water-main break flooded several floors of Brea City Hall, and the shaking knocked down computers and ceiling tiles, Stokes said.

It was not immediately clear if City Hall would reopen Monday. An email to the mayor was not immediately returned.

Friday’s jolt was the strongest to strike the greater Los Angeles region since 2008. Southern California has been in a seismic lull since the deadly 1994 Northridge earthquake killed several dozen people and caused $25 billion in damage.

The latest quake hit a week after a magnitude-4.4 temblor centered in the San Fernando Valley shook buildings and rattled nerves.

It appeared to break a 1-mile segment of the Puente Hills thrust fault, which stretches from the San Gabriel Valley to downtown Los Angeles and caused the 1987 Whittier Narrows quake that killed eight people. The rupture lasted half a second, scientists said.

U.S. Geological Survey seismologist Lucy Jones said it’s unclear whether Southern California is entering a more active seismic period. “We have been in a really quiet time. It can’t stay that way,” Jones said.

A day after the magnitude-5.1 quake, Peter Novahof went shopping with his family at a hardware store in Long Beach. Though nothing was knocked out of his place at his home, he figured it was a good time to think about securing his television and cupboards with glassware.

“We’ve had an earthquake drought for a while,” he said. So people are decorating their houses without taking into consideration that “we’re in earthquake zone.”

___

AP writer Daisy Nguyen contributed to this report from Long Beach, Calif.

___

Follow Alicia Chang at http://twitter.com/SciWriAlicia