Boeing said it could halt production of the 737 Max jet on Wednesday as it reported the company’s largest ever quarterly loss following two fatal accidents involving the plane.

The company lost $2.9bn in the three months to the end of June, compared to a profit of $2.2bn for the same period last year. Sales fell 35% to $15.8bn. Chief executive Dennis Muilenburg said production of the plane could be slowed or halted if regulators do not move to lift the ban on the plane.

The 737 Max was Boeing’s best selling aircraft until the fleet was grounded worldwide in March following crashes in Indonesia and Ethiopia. In January Boeing’s executives said the Max was the fastest selling plane in its history and the company expected to deliver between 895 and 905 airplanes this year.

Now it has become the most costly plane in Boeing’s history.

Boeing has predicted that the Max will be flying again by the end of the year, but this month the Wall Street Journal reported that government and industry officials believe a return date of January 2020 is more likely.

On a call with analysts Muilenburg said the company may have to consider slowing or halting production if there are further delays in getting the plane back into the skies.

Boeing is still producing 42 of its 737 jets a month and plans to boost that rate to 57 next year. But if there are further setbacks, Muilenberg said: “We might need to consider possible further rate reductions or other options including a temporary shutdown of the Max production.”

Muilenberg added that Boeing expected to submit its “final certification package” to the Federal Aviation Administration, the US regulator, in September.

Last week Boeing said it would take a $5.6bn charge to cover potential compensation to customers. The company also expects the cost of manufacturing the 737 to rise by $2.7bn due to production slowdowns. A $100m fund is being established to compensate the families and communities affected by the crashes.

“This is a defining moment for Boeing and we remain focused on our enduring values of safety, quality, and integrity in all that we do, as we work to safely return the 737 Max to service,” Muilenburg, said in a statement.

“During these challenging times, teams across our enterprise continue to perform at a high level while delivering on commitments and capturing new opportunities driven by strong, long-term fundamentals.”

Regulators across the world continue to investigate the fatal crashes of a Lion Air Max in Indonesia and an Ethiopian Airlines flight in Ethiopia that claimed a total of 346 lives.

Investigations have centered on the plane’s Manoeuvring Characteristics Augmentation System (MCAS) flight control software, which was designed to keep the aircraft stable in flight. In both crashes the pilots appear to have fought in vain to keep the plane’s nose up as the system, triggered by flawed sensor readings, dragged it down. Boeing executives subsequently tried to share some of the blame with the pilots.

Last week a father who lost five family members in the Ethiopian disaster accused the company of “utter prejudice and disrespect” and said Boeing had pursued higher a higher share price and profits “at the expense of the safety of human life”.

The grounding of the 737 Max has had wider consequences for the US aerospace industry. American Airlines, Southwest Airlines and United Airlines all used the Max and have canceled flights into November as a result of the grounding, depressing revenues. Ryanair, another major customer and Europe’s largest short-haul airline, has said late deliveries of the 737 Max will force it to cut routes and shut bases as it curbs expansion plans.