This is the first recall for the Model S, blemishing a clean public record for the electric sedan that received a rare, near-perfect score from Consumer Reports magazine. The U.S. automaker twice recalled its first model, the two-door Roadster sports car.

In a statement posted on Tesla’s Web site, chief executive Elon Musk said the Model S defect emerged after the factory made body side alignment changes that weakened the bracket.

A worker at the company’s assembly line in California noticed the defect and reported it to managers, Tesla told the National Highway Traffic Safety Administration.

Tesla said in its filing with the NHTSA that it suspected 20 percent of the 1,228 cars have welds that may not hold in a crash. If the seat becomes unmoored during a crash, there is an increased chance of injury to a passenger.