President Donald Trump is expected to nominate Patrick Shanahan as secretary of defense, the White House announced Thursday.

Shanahan, who has no military experience and is the current acting secretary, worked at Boeing for more than 30 years before Trump tapped him to serve as deputy defense secretary in 2017. He was thrust into the role of acting Pentagon chief at the start of this year, after Defense Secretary James Mattis was ousted by Trump ahead of his planned departure date.

"Acting Secretary Shanahan has proven over the last several months that he is beyond qualified to lead the Department of Defense, and he will continue to do an excellent job," White House press secretary Sarah Sanders said in a statement.

Download the NBC News app for breaking news and politics

If confirmed by the Senate, Shanahan would join more than half a dozen others who led the department without having ever served in the military. Most recently, Ashton Carter, who served as defense secretary under former President Barack Obama, did not have military experience prior to taking on the job.

Shanahan said he was honored to be Trump's pick.

"If confirmed by the Senate, I will continue the aggressive implementation of our National Defense Strategy," he said in a statement. "I remain committed to modernizing the force so our remarkable Soldiers, Sailors, Airmen, and Marines have everything they need to keep our military lethal and our country safe."

News of Shanahan's impending nomination comes just weeks after the Pentagon's internal watchdog cleared the longtime former Boeing executive of allegations he provided his old employer — one of the military's largest contractors — with preferential treatment. Shanahan was accused of pushing Boeing fighter jets on the Air Force and Marines.

Mattis, a retired four-star Marine Corps general who received a special waiver from Congress to serve despite a law barring newly retired officers from heading up the Department of Defense, resigned as Pentagon chief in Dec. 20, 2018, sending Trump a letter that implicitly criticized the president's military judgment.

In the letter, Mattis suggested Trump was not treating allies with respect and had not been "clear-eyed" about U.S. enemies and competitors.

“My views on treating allies with respect and also being clear-eyed about both malign actors and strategic competitors are strongly held and informed by over four decades of immersion in these issues,” he wrote.

Mattis told the president in the letter that he should have a defense chief who shares his views.

Mattis' critical resignation letter reportedly angered Trump, who took a swipe at his top military official on Twitter days later. On Dec. 23, 2018, Trump announced that the retired general would leave his post on Jan. 1, 2019 — two months earlier than the departure date Mattis set in his letter. At the same time, Trump announced Shanahan would take over as acting secretary.

Mattis announced his resignation after Trump appeared to unilaterally move to withdraw U.S. troops from Syria against the advice of the Pentagon. The president soon after ordered the withdrawal of 7,000 troops from Afghanistan.