A new lawsuit filed against Tesla alleges that a California woman was sent into premature labor after her brand-new Model X performed an "unintended acceleration" while she was in front of the vehicle, pinning her against the wall of her garage.

She was eight months pregnant at the time, and her 2-year-old son was in the car.

She is suing Tesla, saying that the company knew the Model X had issues and that Tesla was negligent in designing the car without proper sensors and other safety features.

In a response to Harcourt's attorney, Tesla said the car responded "as designed" during the incident and that company data shows that someone pressed the brake, shifted the car into drive, and hit the accelerator to engage it. Tesla said in the letter that some of these actions were caused by Harcourt's son, who was in the vehicle at the time of the incident.

Tesla declined to comment for this story.

Visit Business Insider's homepage for more stories.

A California woman, Mallory Harcourt, is suing Tesla, alleging that her brand-new 2019 Model X SUV performed an unintended acceleration and pinned her to a wall in her garage. The lawsuit was filed on May 17.

According to the suit, Harcourt was eight months pregnant at the time and the accident sent her into premature labor after breaking her bones. She had just come home from the grocery store and Harcourt's 2-year-old, B.H., was in the car as this was happening, the suit says.

Here's how it happened, according to the lawsuit:

Harcourt's family purchased the Tesla Model X on December 23, 2018.

On December 27, Harcourt exited the car after returning home from shopping and opened the car's falcon-winged doors to remove her groceries and B.H. from the back.

She took her son inside to change his diaper, but he ran back into the car, into the driver's seat. The vehicle was in park.

As Harcourt moved in front of the Model X to remove B.H., the car accelerated, pinning her against the wall with its doors still open, the suit says.

The suit claims the acceleration lifted Harcourt off her feet and pinned her against the wall. B.H. started crying and Harcourt called to her neighbors for help. The neighbors called an ambulance, and Harcourt went to the hospital, where she went into premature labor with her daughter.

Read more: A Tesla Model X driver claims her car crashed into a gym after she hit the brakes — but similar incidents point to a different explanation

Unintended acceleration

Unintended accelerations are not unheard of in the automotive industry. The lawsuit cites a case from 2013 in which an Oklahoma jury rendered a verdict in favor of plaintiffs who alleged that software issues with their Toyota caused an unintended acceleration, which killed one person and injured another.

Harcourt's suit alleges that Tesla's poor Model X design is at fault. The suit says the car lacks proper driver's occupancy seat sensors, control logic to ensure all doors are closed before acceleration, a simultaneously pushed button on the shifting mechanism to engage the car's drive system, and/or necessary control logic to prevent an unintended acceleration or reversal.

To put a Model X into drive and accelerate it, a driver should have to hit the brake and click down the controls on the steering column to move it from park to drive. Then the driver would have to move their foot from the brake to the accelerator, as with any car.

Harcourt alleges that Tesla knew its Model X was faulty and that the company encouraged its agents to say that it was a perfectly safe car for her and her family, despite knowing that it had design flaws. The suit also cites that numerous incidents of unintended acceleration in Tesla vehicles have been reported to the National Highway Traffic Safety Administration, and the rate of those complaints is even higher than Toyota's.

Harcourt's attorney, Alison Gokal, sent Tesla a letter in February acknowledging that B.H. had lodged himself between the accelerator and driver's seat, but that "very minor changes in code, design and manufacturing" could have prevented the unintended acceleration incident.

Gokal told Business Insider that Tesla has so far declined to share any information about the car's diagnostic log during the incident. But in a response to a letter Gokal sent on February 21, the company did describe the events based on what it recorded in the log.

According to Tesla's letter, the company concluded that its data showed that the vehicle "responded to the operator's inputs, as designed," and said that some of the inputs came from Harcourt's son.

Here's how it went down, according to Tesla's letter:

About 9 seconds after someone entered the car, the brake was pushed, the driver's door closed, and the gear shift was put into drive.

Then, over the next 6 seconds, the brake and the accelerator were pressed.

"Over the next 2 seconds, as the accelerator pedal continued to be pressed ranging from 44% to 98%," Tesla said in its statement to Harcourt's attorney.

Tesla continued: "[T]he brake pedal was briefly pressed, prompting the vehicle to issue a user message advising that both pedals were being pressed; at this time, pressing the brake overrode the accelerator pedal such that the motor torque being commanded by the accelerator pedal input was appropriately suppressed."

Over the next 4 seconds, the accelerator and the brake both were pressed, according to Tesla.

Tesla also informed Harcourt that it does not have insurance that applies to this particular situation and has said that it would repurchase the car from her at resale value only.

After a similar incident in April 2018, when a Model X crashed into a gym after the driver reportedly hit the brake, a Tesla spokesperson said that in every case when a driver has "suddenly" and "unexpectedly" accelerated that the company has dealt with, the driver was at fault.

"Accidents involving 'pedal misapplication,' in which a driver presses the accelerator pedal by mistake, occur in all types of vehicles, not just Teslas. The accelerator pedals in Tesla vehicles have two redundant sensors that clearly show us when the pedal is physically pressed down, such as by the driver's foot," it said.

Read the full suit below:

If you have ever experienced an unintended acceleration in a Tesla, or have worked on solving that problem at Tesla or any other car company, email me at llopez@businessinsider.com.