Defense Secretary James Mattis waits outside of the Pentagon in Washington, D.C., April 23, 2018.

Former Defense Secretary James Mattis was elected to the board of directors of the defense contracting giant General Dynamics on Wednesday, the company said.

"Jim is a thoughtful, deliberate and principled leader with a proven track record of selfless service to our nation," said Phebe Novakovic, the company's CEO, in a statement. "We are honored to have him on our board."

Mattis previously served on the General Dynamics board of directors before joining the Trump administration in 2017 to become the 26th secretary of defense.

Mattis, a Marine veteran, left the Trump administration in a shock resignation in December one day after President Donald Trump ordered the withdrawal of 2,000 U.S. troops from Syria.