James MattisWASHINGTON (AP) — Senators signaled little opposition Tuesday to the nomination of James Mattis to be , as national security experts recommended lawmakers amend the law and allow the retired Corps general to head the for President-elect Donald Trump.

At a Senate Armed Services Committee hearing, senators explored the pitfalls of permitting retired to serve as . But two witnesses assured lawmakers that Mattis’ depth of experience and temperament warranted the approval of legislation to override a prohibition against former service members who have been out of uniform for less than seven years holding the job.

The ban exists to uphold the commitment to civilian control of the .

The committee will consider the legislation when it meets Thursday for Mattis’ confirmation hearing. Mattis retired from the Corps as a four-star general in 2013 and had been a battlefield commander for most of his career. The law was last waived for George Marshall in 1950, a former five-star general and secretary of state.

Eliot Cohen, a professor of strategic studies at Johns Hopkins University and a sharp critic of Trump, said civilian control of the “is central to the American experience since colonial times.” But he said Mattis would act as a “stabilizing and moderating force” and prevent “wildly stupid, dangerous or illegal things from happening” on Trump’s watch.

Cohen called Mattis a “man of exceptional character and judgment.”

“He is not General Marshall — but he is indeed a man of similar integrity and soundness, and of very wide experience,” Cohen said.

Kathleen Hicks, a senior vice president at the Center for Strategic and International Studies, said she supported Mattis’ nomination because of his “expert grasp” of key security issues. She also said the current state of civil- relations in the United States is robust enough “to withstand any risk such a once-in-two-generations, on its own, could pose.”

But Hicks advised the committee to reject the notion advanced by Trump that it’s time for a former general to be .

“It should never be considered ‘time for a general’ to fill the senior-most non-elected civilian position in the operational chain of command,” she said.

Sen. Kirsten Gillibrand, D-N.Y., has said she will vote against the legislation to permit Mattis to service.

Follow Richard Lardner on Twitter: http://twitter.com/rplardner