President Donald Trump announced Wednesday plans for the Federal Aviation Administration to ground Boeing 737 Max 8 and 9 planes immediately.

The president said he had spoken to FAA administrator Daniel K. Elwell and Boeing CEO Dennis Muilenburg prior to his announcement.

“They are all in agreement with the action,” Trump said, calling it a “difficult decision” but an important one in the wake of tragic deaths.

The Trump administration decided to ground the flights as a result of two crashes involving the 737 MAX 8 — one operated by Indonesian airline Lion Air killing 189 passengers and one operated by Ethiopian Airlines killing 157. The two crashes occurred within five months of each other, shortly after takeoff.

“Our hearts go out all those who lost loved ones, to their friends, to their families,” Trump said.

Trump announced the FAA’s decision after over 40 countries including the European Union, Canada, India, and China announced decisions to ground the aircraft.

Several pilots also reported problems with the 737 Max plane.

Trump expressed support for Boeing, urging them to come up with a quick solution to the problem.

“Boeing is an incredible company, they are working very, very hard right now and hopefully they’ll very quickly come up with the answer but until they do the planes are grounded,” Trump said.

The president said he felt that it was the right decision to make.

“The United States has the greatest record in the world of aviation and we want to keep it that way,” he said. “So I didn’t want to take any chances. I felt it was important both psychologically and a lot of other ways.”

The FFA released their decision shortly after the president’s announcement, citing data gathering and new evidence collected at the crash site. The suspension will last until further notice.

In a statement, Boeing said they had “full confidence in the safety of the 737 MAX” but supported the decision “out of an abundance of caution and in order to reassure the flying public.”

“We are doing everything we can to understand the cause of the accidents in partnership with the investigators, deploy safety enhancements and help ensure this does not happen again,” Muilenburg said.