After nearly two years and a pair of deadly crashes, the .

The nation's air safety agency announced the move early Wednesday, saying it was done after a 鈥渃omprehensive and methodical鈥 20-month review process.

Regulators around the world grounded the Max in March 2019, after the crash of an Ethiopian Airlines jet. That happened less than five months after another Max flown by Indonesia's Lion Air plunged into the Java Sea. A total of 346 passengers and crew members on both planes were killed.

Federal Aviation Administration chief Stephen Dickson signed an order Wednesday rescinding the grounding. U.S. airlines will be able to fly the Max once Boeing updates critical software and computers on each plane and pilots receive training in flight simulators.

The FAA says the order was made in co-operation with air safety regulators worldwide.

The move follows exhaustive congressional hearings on the crashes that led to criticism of the FAA for lax oversight and Boeing for rushing to implement a new software system that put profits over safety and ultimately led to the firing of its CEO.

Investigators focused on anti-stall software that Boeing had devised to counter the plane's tendency to tilt nose-up because of the size and placement of the engines. That software pushed the nose down repeatedly on both planes that crashed, overcoming the pilots' struggles to regain control. In each case, a single faulty sensor triggered the nose-down pitch.

The new software now requires inputs from two sensors in order to activate the software. Boeing says the software also does not override pilot controls like it did in the past.

The company changed the software so it doesn't repeatedly point the nose of the plane down to counteract possible aerodynamic stalling. Boeing also must change the way wires are routed to a tail stabilizer bar.

On CNBC Wednesday, Dickson said the design and pilot training changes required by the FAA 鈥渕akes it impossible for the airplanes to have the same kind of accident that unfortunately killed 346 people.鈥

In an FAA video, Dickson said that for the time being, the FAA will inspect every new Max before letting the planes fly.

Boeing shares rose 3.5% to $217.38 in early trading Wednesday. That's about half of the all-time high of $440.62 reached on March 1, 2019, just days before the Ethiopian crash, but well above the $95 trough in March, when the pandemic caused massive disruptions to travel and the global economy.

鈥淭hese events and the lessons we have learned as a result have reshaped our company and further focused our attention on our core values of safety, quality and integrity,鈥 Boeing CEO David Calhoun said in a statement.

The aircraft maker's redemption comes in the middle of a pandemic that has scared away passengers and decimated the aviation industry, limiting the company's ability to make a comeback. Air travel in the U.S. alone is down about 65% from a year ago.

Boeing sales of new planes have plunged because of the Max crisis and the coronavirus pandemic. Orders for more than 1,000 Max jets have been cancelled or removed from Boeing's backlog this year. Each plane has a sticker price of $99 million to $135 million, although airlines routinely pay less.

John Hansman, an aeronautics professor at MIT, said people typically avoid airplanes for a few months after there are problems. But the Max case is unusual, and were it not for the novel coronavirus, Hansman said he would feel safe flying on a Max.

鈥淭his whole thing has had more scrutiny than any airplane in the world,鈥 he said. 鈥淚t's probably the safest airplane to be on.鈥

American is the only U.S. airline to put the Max in its schedule so far, starting with one round trip daily between New York and Miami beginning Dec. 29. United expects to start using the plane early next year, while Southwest said its Max jets won't fly before the second quarter of 2021.

Some consumer groups urged airlines to fully disclose when Max flights are planned. That's usually on an airline's website, although passengers have to know where to click. Advocates are concerned about airlines using the Max in a last-minute switch.

Nearly 400 Max jets were in service worldwide when they were grounded, and Boeing has built and stored about 450 more since then. All have to undergo maintenance before they can fly.

Pilots must also undergo simulator training, which was not required when the aircraft was introduced. Hansman said training for qualified 737 pilots shouldn't take long because Boeing has fixed software problems.

Relatives of people who died in the crashes aren't convinced the Max is safe. They accused Boeing of hiding critical design features from the FAA.

鈥淭he flying public should avoid the Max,鈥 said Michael Stumo, whose 24-year-old daughter died in the second crash. 鈥淐hange your flight. This is still a more dangerous aircraft than other modern planes.鈥

Boeing's reputation has taken a beating since the crashes. Its then-CEO, Dennis Muilenburg, initially suggested that the foreign pilots were to blame. However, congressional investigators discovered an FAA analysis - conducted after the first Max crash - that predicted there would be 15 more crashes during the plane's life span if the flight-control software were not fixed.

After an 18-month investigation, the House Transportation Committee heaped blame on Boeing, which was under pressure to develop the Max to compete with a plane from European rival Airbus, and the FAA, which certified the Max and was the last agency in the world to ground it after the crashes. The investigators said Boeing suffered from a 鈥渃ulture of concealment,鈥 and pressured engineers to rush the plane to the market.

Boeing was repeatedly wrong about how quickly it could fix the plane. When those predictions continued to be wrong, and Boeing was perceived as putting undue pressure on the FAA, Muilenburg was fired in December 2019.

Dickson - a former Air Force and Delta Air Lines pilot - flew the plane personally before it was cleared.

Europe's aviation regulator, the European Union Aviation Safety Agency, said it will take public comment on plans to clear the Max for flight and expects to finalize a plan by early next year. Some EU states will have to lift their own grounding notices as well. Regulators in Canada and China are still doing their own reviews.

Relatives say it's too soon, and they and their lawyers say Boeing and the FAA are withholding documents. Anton Sahadi, who lives in Jakarta, Indonesia, and lost two brothers in the Lion Air crash, said it's too early for the Max to fly again.

鈥淭he cases from the incidents are not 100% finished yet,鈥 he said. 鈥淚 think all the victims' family in Indonesia and Ethiopia will feel the same, so regretful, why it can fly again because we are still in the recovery process for our problems because of the incidents.鈥

Naoise Ryan, an Irish citizen whose husband died in the Ethiopian crash, said the Max is 鈥渢he same airplane that crashed not once but twice because safety was not a priority for this company.鈥

------

Koenig, who reported from Dallas, can be reached at www.twitter.com/airlinewriter. Krisher reported from Detroit. Edna Tarigan in Jakarta, Indonesia, and David Risling in Berlin contributed.