SAN LEANDRO -- A glitch in a project by PG&E crews to replace power lines caused an outage affecting more than 24,000 on Thursday morning, a company spokeswoman said.

Customers in San Leandro, Hayward, Castro Valley and San Lorenzo were affected by the outage, which occurred at 9:51 a.m., spokeswoman Tamar Sarkissian said. At its height, the power failure affected approximately 24,300 customers, most of them in San Leandro.

Crews for PG&E are replacing electrical lines in the southern part of San Leandro, and in doing so, they use nonelectrical lines to help them remove and replace electrical ones, Sarkissian said. One of the electrical lines made contact with the nonelectrical one, causing the outage.

Sarkissian said power was fully restored by 11:30 a.m., although outage maps on the company's website suggested power did not return until closer to noon. The hardest hit area was at the south end of East 14th Street in San Leandro, as well as Bayfair Mall and the Manor area in that city.

Contact Rick Hurd at 9235-945-4789 and follow him at Twitter.com/3rdERH.