The Boeing Company has set aside $4.9 billion in the second quarter to cover expected massive losses from the worldwide grounding of its entire fleet of Boeing 737 MAX jetliners after two horrific crashes in a span of five months killed 346 people.

The 737 MAX is the best-selling plane in Boeing’s history, with orders amounting to more than 5,000 aircraft.

The charge, which is equivalent to $8.74 a share, will wipe out Boeing's profits for the second quarter. Boeing said the allowance for losses will reduce revenue and pre-tax earnings by $5.6 billion in Q2.

The massive hit to Boeing’s earnings will result in the company’s first quarterly loss in 10 years. The loss will also be the biggest in Boeing’s history.

Before the announcement, analysts had projected a Q2 profit of $1.3 billion. The charge of $4.9 billion will turn this amount into a loss of $3.6 billion. Boeing’s most recent quarterly loss was in 2009, when it reported a $1.6 billion loss after problems with its 787 Dreamliners and 747-8 planes.

Boeing pointed out the charge reflects penalties for late deliveries and other costs that will continue for years due to the late deliveries of the plane and other costs. The grounding of the 737 MAX has left customers without planes to fly during the peak summer travel period. Boeing said it expects to compensate customers over several years but decided to book all its expected losses in the second quarter.

The ill-fated 737 Max jets have been grounded since mid-March. There is no date set for returning these planes to service but Boeing did previously expect to receive a new certificate of airworthiness from the U.S. Federal Aviation Administration (FAA) by the end of the year.

Boeing, however, has warned the planes might return to service only in early 2020. A delay this long is bound to anger customers that will be deprived of the plane during the peak Thanksgiving and Christmas travel seasons.

The unresolved crisis forced Boeing to slash production of the 737 MAX by nearly a fifth to 42 planes per month. It also stopped delivering new planes, which are now gathering dust in storage facilities.

Airlines have repeatedly delayed the return of the 737 MAX to their flight schedules and have given little guidance on when the jetliner will again return to service.

Boeing will report its financial results next week.

Boeing 737 MAX grounded An American Airlines Boeing 737 Max 8 pulls into its gate after arriving at the Miami International Airport from Saint Thomas on March 13, 2019, in Miami, Florida. Photo: Joe Raedle/Getty Images