Boeing Chief Executive Dennis Muilenburg has been pressed by US senators at a hearing over what the company knew about its MCAS stall-prevention system linked to two deadly crashes.

He was also questioned about delays in turning over internal 2016 messages that described erratic behavior of the software in a simulator.

Boeing's 737 MAX aircraft were grounded worldwide in March after two fatal crashes of a Lion Air flight and an Ethiopian Airlines plane killed 346 people in the past year.

Mr Muilenburg acknowledged errors in failing to give pilots more information on MCAS before the crashes, as well as for taking months to disclose that it had made optional an alarm that alerts pilots to a mismatch of flight data on the 737 MAX.

"We've made mistakes and we got some things wrong. We're improving and we're learning," he said.

The hearing, the highest-profile congressional scrutiny of commercial aviation safety in years, heaps pressure on a newly rejigged Boeing senior management team fighting to repair trust with airline customers and passengers shaken by the eight-month safety ban.

Taking turns to question Mr Muilenburg, senators suggested Boeing had not been completely honest and expressed dismay that the 2016 instant messages did not prompt an immediate reaction from the company.

"You have told this committee and you have told me half-truths over and over again," Senator Tammy Duckworth of Illinois, where Boeing is headquartered, said at one point.

We need your consent to load this rte-player contentWe use rte-player to manage extra content that can set cookies on your device and collect data about your activity. Please review their details and accept them to load the content.Manage Preferences

Later in the hearing, Senator Jon Tester of Montana said: "I would walk before I would get on a 737 MAX ... You shouldn't be cutting corners."

For months, Boeing had largely failed to acknowledge blame, instead vowing to make a "safe plane safer."

Boeing's 737 Max fleet were grounded worldwide in March 

The hearing represents the company's broadest acceptance of responsibility that it made mistakes.

Boeing shares were up 0.6% at $343.03 this afternoon.

Senator Roger Wicker, chair of the Senate Commerce Committee, questioned Mr Muilenburg over the company's delay in releasing internal messages.

In those messages, a former test pilot described erratic behaviour of a simulator version of the same software now linked to the crashes, and also mentioned "Jedi-mind tricking" regulators over training requirements.

Mr Wicker said those messages revealed a "disturbing level of casualness and flippancy."

Mr Muilenburg said he apologised to the Federal Aviation Administration (FAA) administrator for the delay in turning over the messages, and said additional documents would likely be provided over time.

"We will cooperate fully," he added.

Senator refers to 737 MAX as 'flying coffins'

In his opening remarks, Mr Muilenburg walked the committee through software upgrades to limit the authority of the stall-prevention system that has been linked to both crashes. He also listed changes at the company and its board of directors to improve safety oversight and transparency.

During one particularly tense exchange, Senator Maria Cantwell of Washington quizzed Mr Muilenburg and Boeing's senior engineering executive John Hamilton over the extent of testing on the MCAS system.

Ms Cantwell asked Mr Hamilton whether it was a mistake for Boeing not to test a failure mode similar to the scenarios faced by pilots in the crashes.

"In hindsight, senator, yes," Mr Hamilton said. Both he and Mr Muilenburg, however, pointed to extensive testing by engineers and pilots during the certification process that lasted years.

Mr Muilenburg also acknowledged a "mistake on that implementation" for failing to tell the FAA for 13 months that it inadvertently made a so-called angle of attack disagree alert optional on the 737 MAX, instead of standard as on earlier 737s. The company insisted the missing display represented no safety risk.

"We got the implementation wrong," Mr Muilenburg said,referring to the angle of attack disagree alert. He added: "One of the things we've learned ... is we need to provide additional information on MCAS to pilots."

At one point, Senator Richard Blumenthal of Connecticut referred to the 737 MAX as "flying coffins."

Asked ahead of the hearing if he would resign, Mr Muilenburg said that was "not where my focus is."

He also declined to say if he or the board were considering his resignation after the plane returns to service.

Boeing CEO Dennis Muilenburg

Boeing ran full-page advertisements in major newspapers today expressing condolences to the families and loved ones of those killed in the crashes.

"These two accidents occurred on my watch and I have a keen sense of responsibility," Mr Muilenburg told reporters.

Family members, holding photos of victims of the crash, were seated just three rows behind him during his testimony.

Senator Wicker addressed the families, saying: "I promise to their loved ones that we will find out what went wrong and work to prevent future tragedies."

Indonesian investigators reported on Friday that Boeing, acting without adequate oversight from US regulators, failed to grasp risks in the design of cockpit software on the 737 MAX, sowing the seeds for the 29 October 2018, crash of Lion Air Flight 610.

Mr Muilenburg denied today that Boeing's initial statements about the investigative findings from the Lion Air crash sought to shift blame onto pilots.

He also rejected a characterisation of Boeing's "coziness with the FAA," though he said the certification process "can be improved."

Mr Muilenburg was then asked why Boeing had not grounded the plane in the wake of the Lion Air Crash.

"If we could go back, we would make a different decision," he said.