In flight simulations designed to recreate the problems from a doomed Boeing 737 Max airliner, pilots found that they had less than 40 seconds to override a controversial automated system and prevent a crash, according to The New York Times.

The Boeing 737 Max has been grounded worldwide following the crash of an Ethiopian Airlines flight on March 10 that killed 157 people, including eight Americans. The plane crashed just six minutes after takeoff from the Ethiopian capital, Addis Ababa.

In October, another Boeing 737 Max operated by Lion Air also crashed, plunging into the sea shortly after takeoff in Indonesia. Crash data from the Ethiopian Airlines tragedy reportedly shows "clear similarities" between the two accidents.

ETHIOPIAN AIRLINES CRASH DATA SHOWS 'CLEAR SIMILARITIES' WITH LION AIR ACCIDENT, TRANSPORT MINISTER SAYS

Following the crashes, the Boeing 737 Max’s anti-stall software Maneuvering Characteristics Augmentation System (MCAS) has been in the spotlight — the software can pitch the plane's nose down in some cases to keep it from stalling, prompting speculation that it contributed to both accidents.

Citing two people involved in test simulations of the Lion Air crash, The New York Times reports that the software, as it was originally designed and explained, left little margin for error.

In the simulation, the system was triggered after a single sensor failed and the pilots had to react quickly to prevent an “unrecoverable nose dive,” according to the New York Times.

BOEING, FAA QUESTIONED ABOUT SAFETY OF 737 MAX SAFETY SYSTEM DAYS BEFORE ETHIOPIAN AIRLINES CRASH

While the pilots in the test were able to successfully shut the system off and land safely, they did so with prior knowledge of how the controversial system works.

Boeing has promised to update the software and provide additional training for pilots.

“Soon we’ll release a software update and related pilot training for the 737 MAX that will address concerns discovered in the aftermath of the Lion Air Flight 610 accident,” said Boeing CEO Dennis Muilenburg in a letter to airlines, passengers, and the aviation community. “We’ve been working in full cooperation with the U.S. Federal Aviation Administration, the Department of Transportation and the National Transportation Safety Board on all issues relating to both the Lion Air and the Ethiopian Airlines accidents since the Lion Air accident occurred in October last year.”

ETHIOPIAN AIRLINE DEFENDS PILOTS' TRAINING

The Federal Aviation Administration expects Boeing's update this week, according to the Associated Press,

In a statement provided to Fox News, Boeing said that it has invited more than 200 airline pilots, technical leaders and regulators for a briefing at its factory in Renton, Wash. on Wednesday. "This is part of our ongoing effort to share more details about our plan for supporting the safe return of the 737 MAX to commercial service," it explained. "We had a productive session this past Saturday and plan to reach all current and many future MAX operators and their home regulators."

"At the same time, we continue to work closely with our customers and regulators on software and training updates for the 737 MAX," the company added, noting that it is paying for the development of the updates.

BOEING'S NEW 737 MAX PLANE TAKES ITS MAIDEN FLIGHT

As part of the update, Boeing is tweaking the anti-stall software, according to the Associated Press. After the update, the system will rely on data from more than one sensor before it automatically pushes the plane's nose lower. The system won't repeatedly push the nose down, and it will reduce the magnitude of the change.

Boeing said it will pay to train airline pilots. Additional training — to be done on computers, not on a plane or in a flight simulator — is designed to drill home for pilots how they can override the software if it engages unnecessarily.

CLICK HERE TO GET THE FOX NEWS APP

The Boeing 737 Max, which is the fourth generation of the 737, took its maiden flight in a blaze of publicity in January 2016.

Fox News’ Lee Ross, Katherine Lam, Anna Hopkins and The Associated Press contributed to this article.

Follow James Rogers on Twitter @jamesjrogers