DETROIT — A federal safety investigation of the Tesla Motors electric Model S sedan announced on Tuesday comes at a critical juncture for the car and the company.

For the first time, regulators are examining whether the design of the high-end vehicle and its advanced lithium-ion battery pack are defective and the cause of two battery fires.

After garnering high praise for its styling, performance and eco-friendly electric power, the Model S will be the subject of scrutiny by the National Highway Traffic Safety Administration. Tesla’s chief executive, Elon Musk, said the company welcomed the inquiry.

At issue is whether the size, shape and chemical makeup of the car’s battery makes it prone to fires when its lithium-ion cells are punctured in a collision.